| java.lang.Object com.mckoi.util.ByteBuffer
ByteBuffer | final public class ByteBuffer (Code) | | A wrapper for an array of byte[]. This provides various functions for
altering the state of the buffer.
author: Tobias Downer |
Constructor Summary | |
public | ByteBuffer(byte[] buf, int offset, int length) Constructs the buffer. | public | ByteBuffer(byte[] buf) |
Method Summary | |
public ByteBuffer | get(byte[] b, int offset, int length) Gets a byte array from the buffer. | public byte | getByte() | public int | getInt() | public short | getShort() | public int | limit() Returns the limit of this buffer. | public void | position(int position) Sets the position in to the buffer. | public int | position() Returns the current position. | public ByteBuffer | put(byte[] b, int offset, int length) Puts a byte array into the buffer. | public ByteBuffer | put(byte[] b) | public ByteBuffer | put(ByteBuffer buffer) Puts a ByteBuffer in to this buffer. | public ByteBuffer | putByte(byte v) Puts/Gets a byte into the buffer at the current position. | public ByteBuffer | putInt(int v) Puts/Gets an integer into the buffer at the current position. | public ByteBuffer | putShort(short v) Puts/Gets a short into the buffer at the current position. |
ByteBuffer | public ByteBuffer(byte[] buf, int offset, int length)(Code) | | Constructs the buffer.
|
ByteBuffer | public ByteBuffer(byte[] buf)(Code) | | |
get | public ByteBuffer get(byte[] b, int offset, int length)(Code) | | Gets a byte array from the buffer.
|
getByte | public byte getByte()(Code) | | |
getInt | public int getInt()(Code) | | |
getShort | public short getShort()(Code) | | |
limit | public int limit()(Code) | | Returns the limit of this buffer.
|
position | public void position(int position)(Code) | | Sets the position in to the buffer.
|
position | public int position()(Code) | | Returns the current position.
|
put | public ByteBuffer put(byte[] b, int offset, int length)(Code) | | Puts a byte array into the buffer.
|
putByte | public ByteBuffer putByte(byte v)(Code) | | Puts/Gets a byte into the buffer at the current position.
|
putInt | public ByteBuffer putInt(int v)(Code) | | Puts/Gets an integer into the buffer at the current position.
|
putShort | public ByteBuffer putShort(short v)(Code) | | Puts/Gets a short into the buffer at the current position.
|
|
|