public class Base64EncodingStringBufferOutputStream extends AbstractBase64EncodingOutputStream
OutputStream implementation that writes base64 encoded data to a StringBuffer or
StringBuilder. The data is not buffered before writing it to the target.| Modifier and Type | Field and Description |
|---|---|
private java.lang.Appendable |
buffer |
| Constructor and Description |
|---|
Base64EncodingStringBufferOutputStream(java.lang.StringBuffer buffer)
Constructor.
|
Base64EncodingStringBufferOutputStream(java.lang.StringBuilder buffer)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doClose()
Close the underlying stream, if applicable.
|
protected void |
doFlush()
Flush the underlying stream, if applicable.
|
protected void |
doWrite(byte[] b)
Write base64 encoded data.
|
protected void |
flushBuffer()
Write any pending data to the underlying stream, if applicable.
|
public Base64EncodingStringBufferOutputStream(java.lang.StringBuffer buffer)
buffer - the buffer to append the encoded data topublic Base64EncodingStringBufferOutputStream(java.lang.StringBuilder buffer)
buffer - the buffer to append the encoded data toprotected void doWrite(byte[] b)
throws java.io.IOException
AbstractBase64EncodingOutputStreamdoWrite in class AbstractBase64EncodingOutputStreamb - a byte array of length 4java.io.IOException - if an I/O error occursprotected void flushBuffer()
throws java.io.IOException
AbstractBase64EncodingOutputStreamflushBuffer in class AbstractBase64EncodingOutputStreamjava.io.IOException - if an I/O error occursprotected void doClose()
throws java.io.IOException
AbstractBase64EncodingOutputStreamdoClose in class AbstractBase64EncodingOutputStreamjava.io.IOException - if an I/O error occursprotected void doFlush()
throws java.io.IOException
AbstractBase64EncodingOutputStreamdoFlush in class AbstractBase64EncodingOutputStreamjava.io.IOException - if an I/O error occurs