|
Agent System POND 1.2 (28.2.2002) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--java.io.FilterOutputStream | +--FIM.Util.Coder.Base64.Base64OutputStream
An output stream which encodes a file into base64 format.
Field Summary | |
(package private) static char[] |
b
Base64 encoding bytes |
(package private) int |
chunksdone
Number of chunks (3 bytes unencoded to 4 bytes encoded) done |
(package private) boolean |
finished
if the encoding is finished |
(package private) static byte |
PAD
Padding byte |
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary | |
Base64OutputStream(OutputStream out)
Creates a new Base64OutputStream. |
|
Base64OutputStream(OutputStream out,
boolean textfile)
Creates a new Base64OutputStream, for a text file. |
Method Summary | |
void |
close()
Closes the stream. |
protected void |
empty_buffer()
Encode all buffered bytes and write the encoded bytes to the output stream. |
static void |
main(String[] args)
Test for Base64OutputStream. |
void |
write(byte[] b,
int off,
int len)
Writes a subarray of bytes. |
void |
write(int b)
Writes a byte. |
Methods inherited from class java.io.FilterOutputStream |
flush, write |
Methods inherited from class java.lang.Object |
|
Field Detail |
int chunksdone
boolean finished
static char[] b
static byte PAD
Constructor Detail |
public Base64OutputStream(OutputStream out)
out
- the output streampublic Base64OutputStream(OutputStream out, boolean textfile)
true
,
a \n will be written as \r\n.out
- the output streamtextfile
- true if the file is a text file.Method Detail |
public void write(int b) throws IOException
write
in class FilterOutputStream
b
- the byte to writeIOException
- if an I/O error has occurred.public void write(byte[] b, int off, int len) throws IOException
write
in class FilterOutputStream
b
- the data to be writtenoff
- the start offset in the datalen
- the number of bytes that are writtenIOException
- if an I/O error has occurred.public void close() throws IOException
close
in class FilterOutputStream
IOException
- if an I/O error has occurred.protected void empty_buffer() throws IOException
IOException
- if an I/O error has occurred.public static void main(String[] args)
|
Agent System POND 1.2 (28.2.2002) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |