com.partnersoft.data
Class CharBuffer
java.lang.Object
com.partnersoft.data.DataBuffer
com.partnersoft.data.CharBuffer
- All Implemented Interfaces:
- java.io.Serializable
public class CharBuffer
- extends DataBuffer
A fast char array buffer with public access to contents. Intended for fast
and unsafe operations.
- Author:
- Paul Reavis Copyright 2001 Partner Software, Inc.
- See Also:
- Serialized Form
|
Field Summary |
char[] |
array
|
|
Constructor Summary |
CharBuffer()
Creates an empty char buffer. |
CharBuffer(int size)
Creates a char buffer of the given size. |
|
Method Summary |
void |
append(char[] stuff)
|
void |
append(java.lang.String stuff)
|
java.lang.String |
asString()
|
void |
newArray(int size)
Allocates a new, empty array of the given size and assign it to the
arrayObject property. |
| Methods inherited from class com.partnersoft.data.DataBuffer |
append, clear, clone, copy, copyTo, getSize, insert, isEmpty, makeRoomFor, makeRoomFor, pack, remove, setToMatch, subsection, tidy, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
array
public char[] array
CharBuffer
public CharBuffer()
- Creates an empty char buffer. buffer is left null!
CharBuffer
public CharBuffer(int size)
- Creates a char buffer of the given size.
newArray
public void newArray(int size)
- Description copied from class:
DataBuffer
- Allocates a new, empty array of the given size and assign it to the
arrayObject property. It is assumed that subclasses will also set it to a
variable of the correct class (e.g. char[]) for ease of access as well.
Copying of existing contents is managed by this superclass.
- Specified by:
newArray in class DataBuffer
append
public void append(char[] stuff)
append
public void append(java.lang.String stuff)
asString
public java.lang.String asString()