public class Base64EncoderStream extends 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 |
out
Constructor and Description |
---|
Base64EncoderStream(OutputStream out)
Create a Base64 encoder stream that wraps a specifed stream
using the default line break size.
|
Base64EncoderStream(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(OutputStream out)
out
- The wrapped output stream.public Base64EncoderStream(OutputStream out, int lineBreak)
public void write(int ch) throws IOException
write
in class FilterOutputStream
IOException
public void write(byte[] data) throws IOException
write
in class FilterOutputStream
IOException
public void write(byte[] data, int offset, int length) throws IOException
write
in class FilterOutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class FilterOutputStream
IOException
Copyright © 2013. All rights reserved.