Example usage for Java java.io ByteArrayOutputStream fields, constructors, methods, implement or subclass
The text is from its open source code.
ByteArrayOutputStream() Creates a new ByteArrayOutputStream . | |
ByteArrayOutputStream(int size) Creates a new ByteArrayOutputStream , 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 | notifyAll() Wakes up all threads that are waiting on this object's monitor. |
void | reset() Resets the count field of this ByteArrayOutputStream to zero, so that all currently accumulated output in the output stream is discarded. |
int | size() Returns the current size of the buffer. |
byte[] | toByteArray() Creates a newly allocated byte array. |
String | toString() Converts the buffer's contents into a string decoding bytes using the platform's default character set. |
String | toString(String charsetName) Converts the buffer's contents into a string by decoding the bytes using the named java.nio.charset.Charset charset . |
String | toString(Charset charset) Converts the buffer's contents into a string by decoding the bytes using the specified java.nio.charset.Charset charset . |
String | toString(int hibyte) Creates a newly allocated string. |
void | wait() Causes the current thread to wait until it is awakened, typically by being notified or interrupted. |
void | write(int b) Writes the specified byte to this ByteArrayOutputStream . |
void | write(byte b[], int off, int len) Writes len bytes from the specified byte array starting at offset off to this ByteArrayOutputStream . |
void | writeTo(OutputStream out) Writes the complete contents of this ByteArrayOutputStream to the specified output stream argument, as if by calling the output stream's write method using out.write(buf, 0, count) . |