public class Base64EncoderStream
extends java.io.FilterOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
buffer |
protected int |
bufferedBytes |
protected static byte[] |
CRLF |
protected static int |
DEFAULT_LINEBREAK |
protected Base64Encoder |
encoder |
protected int |
lineBreak |
protected int |
outputCount |
| Constructor and Description |
|---|
Base64EncoderStream(java.io.OutputStream out)
Create a Base64 encoder stream that wraps a specifed stream
using the default line break size.
|
Base64EncoderStream(java.io.OutputStream out,
int lineBreak) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
write(byte[] data) |
void |
write(byte[] data,
int offset,
int length) |
void |
write(int ch) |
protected static final byte[] CRLF
protected Base64Encoder encoder
protected static final int DEFAULT_LINEBREAK
protected int bufferedBytes
protected byte[] buffer
protected int lineBreak
protected int outputCount
public Base64EncoderStream(java.io.OutputStream out)
out - The wrapped output stream.public Base64EncoderStream(java.io.OutputStream out,
int lineBreak)
public void write(int ch)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void write(byte[] data)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void write(byte[] data,
int offset,
int length)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.FilterOutputStreamjava.io.IOException