public class Base64OutputStream extends OutputStream
Code is based on Base64 and Base64OutputStream code from Commons-Codec 1.4.
| Constructor and Description |
|---|
Base64OutputStream(OutputStream out)
Creates a
Base64OutputStream that writes the encoded data
to the given output stream using the default line length (76) and line
separator (CRLF). |
Base64OutputStream(OutputStream out,
int lineLength)
Creates a
Base64OutputStream that writes the encoded data
to the given output stream using the given line length and the default
line separator (CRLF). |
Base64OutputStream(OutputStream out,
int lineLength,
byte[] lineSeparator)
Creates a
Base64OutputStream that writes the encoded data
to the given output stream using the given line length and line
separator. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int i) |
public Base64OutputStream(OutputStream out)
Base64OutputStream that writes the encoded data
to the given output stream using the default line length (76) and line
separator (CRLF).out - underlying output stream.public Base64OutputStream(OutputStream out, int lineLength)
Base64OutputStream that writes the encoded data
to the given output stream using the given line length and the default
line separator (CRLF).
The given line length will be rounded up to the nearest multiple of 4. If the line length is zero then the output will not be split into lines.
out - underlying output stream.lineLength - desired line length.public Base64OutputStream(OutputStream out, int lineLength, byte[] lineSeparator)
Base64OutputStream that writes the encoded data
to the given output stream using the given line length and line
separator.
The given line length will be rounded up to the nearest multiple of 4. If the line length is zero then the output will not be split into lines and the line separator is ignored.
The line separator must not include characters from the BASE64 alphabet
(including the padding character =).
out - underlying output stream.lineLength - desired line length.lineSeparator - line separator to use.public void write(int i)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.