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) |
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.FilterOutputStream
java.io.IOException
public void write(byte[] data) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void write(byte[] data, int offset, int length) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterOutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.FilterOutputStream
java.io.IOException