Example usage for Java org.apache.commons.io.output ByteArrayOutputStream fields, constructors, methods, implement or subclass
The text is from its open source code.
ByteArrayOutputStream() Creates a new byte array output stream. | |
ByteArrayOutputStream(int size) Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes. |
void | close() Closing a ByteArrayOutputStream has no effect. |
void | flush() Flushes this output stream and forces any buffered output bytes to be written out. |
void | reset() |
int | size() Return the current size of the byte array. |
byte[] | toByteArray() Gets the curent contents of this byte stream as a byte array. |
String | toString() Gets the curent contents of this byte stream as a string. |
String | toString(String enc) Gets the curent contents of this byte stream as a string using the specified encoding. |
void | write(byte[] b, int off, int len) Write the bytes to byte array. |
void | write(int b) Write a byte to byte array. |
int | write(InputStream in) Writes the entire contents of the specified input stream to this byte stream. |
void | writeTo(OutputStream out) Writes the entire contents of this byte stream to the specified output stream. |