|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.hyphenation.ByteVector
public class ByteVector
This class implements a simple byte vector with access to the underlying array.
This work was authored by Carlos Villegas (cav@uniscope.co.jp).
Constructor Summary | |
---|---|
ByteVector()
Construct byte vector instance with default block size. |
|
ByteVector(byte[] a)
Construct byte vector instance. |
|
ByteVector(byte[] a,
int capacity)
Construct byte vector instance. |
|
ByteVector(int capacity)
Construct byte vector instance. |
Method Summary | |
---|---|
int |
alloc(int size)
This is to implement memory allocation in the array. |
int |
capacity()
Obtain capacity of array. |
byte |
get(int index)
Get byte at index. |
byte[] |
getArray()
Obtain byte vector array. |
int |
length()
Obtain number of items in array. |
void |
put(int index,
byte val)
Pet byte at index. |
void |
trimToSize()
Trim byte vector to current length. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteVector()
public ByteVector(int capacity)
capacity
- initial block sizepublic ByteVector(byte[] a)
a
- byte array to use
TODO should n should be initialized to a.length to be consistent with
CharVector behavior? [GA]public ByteVector(byte[] a, int capacity)
a
- byte array to usecapacity
- initial block size
TODO should n should be initialized to a.length to be consistent with
CharVector behavior? [GA]Method Detail |
---|
public byte[] getArray()
public int length()
public int capacity()
public void put(int index, byte val)
index
- the indexval
- a bytepublic byte get(int index)
index
- the index
public int alloc(int size)
size
- to allocate
public void trimToSize()
|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |