This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Modifier and Type | Class and Description |
|---|---|
| public static class | ByteBuffer.
Thrown when trying to read past the end of the buffer. |
| Modifier and Type | Field and Description |
|---|---|
| public byte[] | elems
An array holding the bytes in this buffer; can be grown. |
| public int | length
The current number of defined bytes in this buffer. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | appendBytes(byte[] bs, int start, int len)
Append `len' bytes from byte array, starting at given `start' offset. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public ByteBuffer | |
| public byte | |
| public char | |
| public double | |
| public float | |
| public int | |
| public long | |
| public void | |
| public Name | |
| public void | verifyRange(int
starting offset off, int required length len)Verify there are at least the specified number of bytes in this buffer at the specified offset. |
| elems | back to summary |
|---|---|
| public byte[] elems An array holding the bytes in this buffer; can be grown. | |
| length | back to summary |
|---|---|
| public int length The current number of defined bytes in this buffer. | |
| ByteBuffer | back to summary |
|---|---|
| public ByteBuffer() Create a new byte buffer. | |
| ByteBuffer | back to summary |
|---|---|
| public ByteBuffer(int initialSize) Create a new byte buffer with an initial elements array of given size. | |
| ByteBuffer | back to summary |
|---|---|
| public ByteBuffer(byte[] elems) Create a new byte buffer using the given array for storage. | |
| appendByte | back to summary |
|---|---|
| public void appendByte(int b) Append byte to this buffer. | |
| appendBytes | back to summary |
|---|---|
| public void appendBytes(byte[] bs, int start, int len) Append `len' bytes from byte array, starting at given `start' offset. | |
| appendBytes | back to summary |
|---|---|
| public void appendBytes(byte[] bs) Append all bytes from given byte array. | |
| appendChar | back to summary |
|---|---|
| public void appendChar(int x) Append a character as a two byte number. | |
| appendDouble | back to summary |
|---|---|
| public void appendDouble(double x) Append a double as a eight byte number. | |
| appendFloat | back to summary |
|---|---|
| public void appendFloat(float x) Append a float as a four byte number. | |
| appendInt | back to summary |
|---|---|
| public void appendInt(int x) Append an integer as a four byte number. | |
| appendLong | back to summary |
|---|---|
| public void appendLong(long x) Append a long as an eight byte number. | |
| appendName | back to summary |
|---|---|
| public void appendName(Name name) Append a name encoded in Modified UTF-8. | |
| appendStream | back to summary |
|---|---|
| public void appendStream(InputStream input) throws IOException Append the content of the given input stream. | |
| asByteBuffer | back to summary |
|---|---|
| public ByteBuffer asByteBuffer() Create a If this instance is modified, the returned buffer may no longer reflect it. | |
| getByte | back to summary |
|---|---|
| public byte getByte(int bp) throws UnderflowException Extract a byte at position bp from elems.
| |
| getChar | back to summary |
|---|---|
| public char getChar(int bp) throws UnderflowException Extract a character at position bp from elems.
| |
| getDouble | back to summary |
|---|---|
| public double getDouble(int bp) throws UnderflowException Extract a double at position bp from elems.
| |
| getFloat | back to summary |
|---|---|
| public float getFloat(int bp) throws UnderflowException Extract a float at position bp from elems.
| |
| getInt | back to summary |
|---|---|
| public int getInt(int bp) throws UnderflowException Extract an integer at position bp from elems.
| |
| getLong | back to summary |
|---|---|
| public long getLong(int bp) throws UnderflowException Extract a long integer at position bp from elems.
| |
| reset | back to summary |
|---|---|
| public void reset() Reset to zero length. | |
| toName | back to summary |
|---|---|
| public Name toName(Names names) throws InvalidUtfException Convert contents to name.
| |
| verifyRange | back to summary |
|---|---|
| public void verifyRange(int off, int len) throws UnderflowException Verify there are at least the specified number of bytes in this buffer at the specified offset.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int |
| length | back to summary |
|---|---|
| private final int length | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| UnderflowException | back to summary |
|---|---|
| public UnderflowException(int length) | |
| getLength | back to summary |
|---|---|
| public int getLength() Get the length of the buffer, which apparently is not long enough. | |