public class Base64OutputStream extends FilterOutputStream
out
Constructor and Description |
---|
Base64OutputStream(OutputStream out,
int options)
Performs Base64 encoding on the data written to the stream, writing the
encoded data to another OutputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Encodes and writes the remaining buffered bytes, adds necessary padding,
and closes the output stream.
|
void |
flush()
Flushed the enclosed output stream, but does not write uncompleted 4-blocks.
|
void |
write(int theByte)
Writes the byte to the output stream after converting to/from Base64
notation.
|
write, write
public Base64OutputStream(OutputStream out, int options)
out
- the OutputStream to write the encoded data tooptions
- bit flags for controlling the encoder; see the constants in Base64public void write(int theByte) throws IOException
write
in class FilterOutputStream
theByte
- the byte to write.IOException
- when unable to write data.public void flush() throws IOException
flush
in interface Flushable
flush
in class FilterOutputStream
IOException
- If unable to write to the output stream.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException
- If unable to write the remaining bytes or close the
stream.Copyright © 2018. All rights reserved.