| java.lang.Object java.io.OutputStream com.sun.xml.ws.util.ByteArrayBuffer
Field Summary | |
protected byte[] | buf The buffer where data is stored. |
Constructor Summary | |
public | ByteArrayBuffer() Creates a new byte array output stream. | public | ByteArrayBuffer(int size) Creates a new byte array output stream, with a buffer capacity of
the specified size, in bytes. | public | ByteArrayBuffer(byte[] data) |
buf | protected byte[] buf(Code) | | The buffer where data is stored.
|
ByteArrayBuffer | public ByteArrayBuffer()(Code) | | Creates a new byte array output stream. The buffer capacity is
initially 32 bytes, though its size increases if necessary.
|
ByteArrayBuffer | public ByteArrayBuffer(int size)(Code) | | Creates a new byte array output stream, with a buffer capacity of
the specified size, in bytes.
Parameters: size - the initial size. throws: IllegalArgumentException - if size is negative. |
ByteArrayBuffer | public ByteArrayBuffer(byte[] data)(Code) | | |
newInputStream | final public InputStream newInputStream(int start, int length)(Code) | | Creates a new
InputStream that reads a part of this bfufer.
|
reset | final public void reset()(Code) | | |
size | final public int size()(Code) | | |
toByteArray | final public byte[] toByteArray()(Code) | | Gets the copy of exact-size byte[] that represents the written data.
Since this method needs to allocate a new byte[], this method will be costly.
|
toString | public String toString()(Code) | | Decodes the contents of this buffer by the default encoding
and returns it as a string.
Meant to aid debugging, but no more.
|
write | final public void write(int b)(Code) | | |
write | final public void write(byte b, int off, int len)(Code) | | |
|
|