Method Summary |
|
public void | close() Close this ByteArrayOutputStream. |
public synchronized void | reset() Reset this ByteArrayOutputStream to the beginning of the underlying byte
array. |
public int | size() Answers the total number of bytes written to this stream thus far. |
public synchronized byte[] | toByteArray() Answer the contents of this ByteArrayOutputStream as a byte array. |
public String | toString() Answer the contents of this ByteArrayOutputStream as a String. |
public String | toString(int hibyte) Answer the contents of this ByteArrayOutputStream as a String. |
public String | toString(String enc) Answer the contents of this ByteArrayOutputStream as a String converted
using the encoding declared in enc .
Parameters: enc - A String representing the encoding to use when translatingthis stream to a String. |
public synchronized void | write(byte[] buffer, int offset, int len) Writes count bytes from the byte array
buffer starting at offset index to the
ByteArrayOutputStream. |
public synchronized void | write(int oneByte) Writes the specified byte oneByte to the OutputStream. |
public synchronized void | writeTo(OutputStream out) Take the contents of this stream and write it to the output stream
out . |