| Modifier and Type | Method and Description |
|---|---|
| public byte[] | Returns: a copy of the buffer in a new byte arraywraps up the current buffer as a new byte array and passed ownership of the copy to the caller. |
| public int | Returns: number of bytes actually copiedusers byte array to copy into buffer, int first byte of the array to use offset, int length of the byte array available to copy into length)copies the contents of the buffer into a user supplied byte array. |
| public ByteReader | Returns: a new readercreates a reader and sets it to the beginning of the buffer under managment here for use. |
| public ByteWriter | Returns: a new writercreates a writer and sets it to the beginning of the buffer under managment here for use. |
| public void | writeBytes(OutputStream
stream to write into out)copies the contents of the buffer into and output stream. |
| getBytes | back to summary |
|---|---|
| public byte[] getBytes() wraps up the current buffer as a new byte array and passed ownership of the copy to the caller.
| |
| getBytes | back to summary |
|---|---|
| public int getBytes(byte[] buffer, int offset, int length) copies the contents of the buffer into a user supplied byte array. It copies into the user buffer starting at the supplied offset and attempts to copy no more than length bytes. If the implmentation cannot determine the length to be copied before copying it may overwrite some of the user buffer and will throw at the end of the copy. (note that is may throw an out of bounds exception if the write extends beyond the length of the callers array)
| |
| getReader | back to summary |
|---|---|
| public ByteReader getReader() creates a reader and sets it to the beginning of the buffer under managment here for use.
| |
| getWriter | back to summary |
|---|---|
| public ByteWriter getWriter() creates a writer and sets it to the beginning of the buffer under managment here for use.
| |
| writeBytes | back to summary |
|---|---|
| public void writeBytes(OutputStream out) throws IOException copies the contents of the buffer into and output stream.
| |