|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iicm.vrml.pwutils.ByteArray
ByteArray - dynamic array of byte type values better time and memory efficiency than Vector, byte[] accessible in native code Copyright (c) 1996 IICM
Constructor Summary | |
ByteArray()
create with default length |
|
ByteArray(byte[] dat)
copy initial data from another byte[]. |
|
ByteArray(ByteArray dat)
copy initial data from another ByteArray (non-null). do not use the above constructor in this case, as it would use all values, not just the used length (count); again: values are *copied* |
|
ByteArray(int len)
create with initial buffer length |
Method Summary | |
void |
append(byte d)
append one byte element |
void |
append(byte[] d,
int num)
append several byte elements |
boolean |
clearData()
clear the array |
int |
getCount()
get count of used array members. |
byte[] |
getData()
get data array. |
byte[] |
getTrimmedArray()
get data array with proper length. |
void |
setData(byte[] dat)
copy data from a byte[] |
void |
setData(byte[] dat,
int n)
copy first n elements of a byte[] |
void |
setData(ByteArray dat)
copy data from another ByteArray |
void |
setSize(int n)
set number of used array elements (ensures there is enough storage) |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ByteArray()
public ByteArray(int len)
public ByteArray(byte[] dat)
public ByteArray(ByteArray dat)
Method Detail |
public void setData(ByteArray dat)
public void setData(byte[] dat)
public void setData(byte[] dat, int n)
public final int getCount()
public final byte[] getData()
public final byte[] getTrimmedArray()
public void append(byte d)
public void append(byte[] d, int num)
public void setSize(int n)
public boolean clearData()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |