com.lowagie.text.rtf.document.output
public final class RtfByteArrayBuffer extends OutputStream
Version: $Id: RtfByteArrayBuffer.java 3433 2008-05-24 19:32:11Z xlv $
| Field Summary | |
|---|---|
| List | arrays |
| byte[] | buffer |
| int | pos |
| int | size |
| Constructor Summary | |
|---|---|
| RtfByteArrayBuffer()
Constructs a new buffer with a default initial size of 128 bytes. | |
| RtfByteArrayBuffer(int bufferSize)
Creates a new buffer with the given initial size.
| |
| Method Summary | |
|---|---|
| void | append(byte[] a)
Appends the given array to this buffer without copying (if possible).
|
| void | append(byte[][] a)
Appends all arrays to this buffer without copying (if possible).
|
| void | flushBuffer() |
| void | flushBuffer(int reqSize) |
| void | reset()
Resets this buffer. |
| long | size()
Returns the number of bytes that have been written to this buffer so far.
|
| byte[] | toByteArray()
Allocates a new array and copies all data that has been written to this buffer to the newly allocated array.
|
| byte[][] | toByteArrayArray()
Returns the internal list of byte array buffers without copying the buffer contents.
|
| String | toString() |
| void | write(int b)
Copies the given byte to the internal buffer.
|
| void | write(byte[] src)
Copies the given array to the internal buffer.
|
| void | write(byte[] src, int off, int len)
Copies len bytes starting at position off from the array src to the internal buffer.
|
| long | write(InputStream in)
Writes all bytes available in the given inputstream to this buffer.
|
| void | writeLoop(byte[] src, int off, int len) |
| void | writeTo(OutputStream out)
Writes all data that has been written to this buffer to the given output stream.
|
Parameters: bufferSize desired initial size in bytes
Parameters: a
Parameters: a
Returns: number of bytes written to this buffer
Returns: a new byte array
Returns: number of bytes written
Parameters: b
Parameters: src
Parameters: src off len
Parameters: in
Returns: number of bytes written
Throws: IOException
Parameters: out
Throws: IOException