| java.lang.Object org.objectweb.asm.jip.ByteVector
ByteVector | public class ByteVector (Code) | | A dynamically extensible vector of bytes. This class is roughly equivalent to
a DataOutputStream on top of a ByteArrayOutputStream, but is more efficient.
author: Eric Bruneton |
Field Summary | |
byte[] | data The content of this vector. | int | length Actual number of bytes in this vector. |
Constructor Summary | |
public | ByteVector() Constructs a new
ByteVector ByteVector with a default initial
size. | public | ByteVector(int initialSize) Constructs a new
ByteVector ByteVector with the given initial
size. |
data | byte[] data(Code) | | The content of this vector.
|
length | int length(Code) | | Actual number of bytes in this vector.
|
ByteVector | public ByteVector()(Code) | | Constructs a new
ByteVector ByteVector with a default initial
size.
|
ByteVector | public ByteVector(int initialSize)(Code) | | Constructs a new
ByteVector ByteVector with the given initial
size.
Parameters: initialSize - the initial size of the byte vector to be constructed. |
put11 | ByteVector put11(int b1, int b2)(Code) | | Puts two bytes into this byte vector. The byte vector is automatically
enlarged if necessary.
Parameters: b1 - a byte. Parameters: b2 - another byte. this byte vector. |
put12 | ByteVector put12(int b, int s)(Code) | | Puts a byte and a short into this byte vector. The byte vector is
automatically enlarged if necessary.
Parameters: b - a byte. Parameters: s - a short. this byte vector. |
putByte | public ByteVector putByte(int b)(Code) | | Puts a byte into this byte vector. The byte vector is automatically
enlarged if necessary.
Parameters: b - a byte. this byte vector. |
putByteArray | public ByteVector putByteArray(byte[] b, int off, int len)(Code) | | Puts an array of bytes into this byte vector. The byte vector is
automatically enlarged if necessary.
Parameters: b - an array of bytes. May be null to put lennull bytes into this byte vector. Parameters: off - index of the fist byte of b that must be copied. Parameters: len - number of bytes of b that must be copied. this byte vector. |
putInt | public ByteVector putInt(int i)(Code) | | Puts an int into this byte vector. The byte vector is automatically
enlarged if necessary.
Parameters: i - an int. this byte vector. |
putLong | public ByteVector putLong(long l)(Code) | | Puts a long into this byte vector. The byte vector is automatically
enlarged if necessary.
Parameters: l - a long. this byte vector. |
putShort | public ByteVector putShort(int s)(Code) | | Puts a short into this byte vector. The byte vector is automatically
enlarged if necessary.
Parameters: s - a short. this byte vector. |
putUTF8 | public ByteVector putUTF8(String s)(Code) | | Puts an UTF8 string into this byte vector. The byte vector is
automatically enlarged if necessary.
Parameters: s - a String. this byte vector. |
|
|