public class ByteVector
A dynamically extensible vector of bytes. This class is roughly equivalent to a DataOutputStream
on top of a ByteArrayOutputStream, but is more efficient.
public | Constructs a new ByteVector with a default initial capacity. |
public | ByteVector( Constructs a new ByteVector with the given initial capacity. |
public ByteVector | putByte( Puts a byte into this byte vector. |
public ByteVector | putByteArray( Puts an array of bytes into this byte vector. |
public ByteVector | putInt( Puts an int into this byte vector. |
public ByteVector | putLong( Puts a long into this byte vector. |
public ByteVector | putShort( Puts a short into this byte vector. |
public ByteVector | Puts an UTF8 string into this byte vector. |
Constructs a new ByteVector with a default initial capacity.
Constructs a new ByteVector with the given initial capacity.
initialCapacitythe initial capacity of the byte vector to be constructed.
Puts a byte into this byte vector. The byte vector is automatically enlarged if necessary.
byteValuea byte.
this byte vector.
Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if
necessary.
byteArrayValuean array of bytes. May be null to put
byteLength
null
bytes into this byte vector.byteOffsetindex of the first byte of byteArrayValue that must be copied.
byteLengthnumber of bytes of byteArrayValue that must be copied.
this byte vector.
Puts an int into this byte vector. The byte vector is automatically enlarged if necessary.
intValuean int.
this byte vector.
Puts a long into this byte vector. The byte vector is automatically enlarged if necessary.
longValuea long.
this byte vector.
Puts a short into this byte vector. The byte vector is automatically enlarged if necessary.
shortValuea short.
this byte vector.
Puts an UTF8 string into this byte vector. The byte vector is automatically enlarged if
necessary.
stringValuea String whose UTF8 encoded length must be less than 65536.
this byte vector.