Package org.apache.axiom.util.base64
Class Base64EncodingStringBufferOutputStream
java.lang.Object
java.io.OutputStream
org.apache.axiom.util.base64.AbstractBase64EncodingOutputStream
org.apache.axiom.util.base64.Base64EncodingStringBufferOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
OutputStream
implementation that writes base64 encoded data to a StringBuffer
or
StringBuilder
. The data is not buffered before writing it to the target.-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
Write any pending data to the underlying stream, if applicable.Methods inherited from class org.apache.axiom.util.base64.AbstractBase64EncodingOutputStream
close, complete, flush, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
Base64EncodingStringBufferOutputStream
Constructor.- Parameters:
buffer
- the buffer to append the encoded data to
-
Base64EncodingStringBufferOutputStream
Constructor.- Parameters:
buffer
- the buffer to append the encoded data to
-
-
Method Details
-
doWrite
Description copied from class:AbstractBase64EncodingOutputStream
Write base64 encoded data. If necessary, the implementation should accumulate the data in a buffer before writing it to the underlying stream.- Specified by:
doWrite
in classAbstractBase64EncodingOutputStream
- Parameters:
b
- a byte array of length 4- Throws:
IOException
- if an I/O error occurs
-
flushBuffer
Description copied from class:AbstractBase64EncodingOutputStream
Write any pending data to the underlying stream, if applicable. Note that implementations should not flush the underlying stream.- Specified by:
flushBuffer
in classAbstractBase64EncodingOutputStream
- Throws:
IOException
- if an I/O error occurs
-
doClose
Description copied from class:AbstractBase64EncodingOutputStream
Close the underlying stream, if applicable.- Specified by:
doClose
in classAbstractBase64EncodingOutputStream
- Throws:
IOException
- if an I/O error occurs
-
doFlush
Description copied from class:AbstractBase64EncodingOutputStream
Flush the underlying stream, if applicable.- Specified by:
doFlush
in classAbstractBase64EncodingOutputStream
- Throws:
IOException
- if an I/O error occurs
-