| Modifier and Type | Class and Description |
|---|---|
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final boolean | |
| public static final int | |
| public static final int | |
| public static final boolean |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | Returns: abyte[] backing this buffer or null if none exists.Get the underlying array, if one exists. |
| public byte[] | |
| public Buffer | |
| public Buffer | |
| public Buffer | |
| public Buffer | |
| public Buffer | Returns: The root backing buffer or this if there is no backing buffer;Get the unerlying buffer. |
| public int | |
| public void | |
| public void | |
| public boolean | Returns: aboolean value true if case sensitive comparison on this buffer
|
| public byte | Returns: Thebyte value from the current getIndex.Get the byte at the current getIndex and increment it. |
| public int | Returns: The number of bytes actually read.The byte array to fill. b, int Offset in the array. offset, int The max number of bytes to read. length)Get bytes from the current postion and put them into the passed byte array. |
| public Buffer | |
| public int | Returns: anint value >=0 <= putIndex()The index within the buffer that will next be read or written. |
| public boolean | |
| public boolean | Returns: aboolean value true if the buffer is immutable and that neither
the buffer contents nor the indexes may be changed.
|
| public boolean | Returns: aboolean value true if the buffer is readonly. The buffer indexes may
be modified, but the buffer contents may not. For example a View onto an immutable Buffer will be
read only.
|
| public boolean | Returns: aboolean value true if the buffer contents may change
via alternate paths than this buffer. If the contents of this buffer are to be used outside of the
current context, then a copy must be made.
|
| public int | Returns: anint == putIndex()-getIndex()The number of bytes from the getIndex to the putIndex |
| public void | |
| public void | mark(int
an offset)int value to add to the current getIndex to obtain the mark value.Set the mark relative to the current getIndex |
| public int | Returns: anint index in the buffer or -1 if the mark is not set.The current index of the mark. |
| public byte | Returns: Thebyte value from the current getIndex.Get the byte at the current getIndex without incrementing the getIndex. |
| public byte | |
| public Buffer | Returns: TheBuffer value from the requested getIndex.an index, int int valuean length)int value
|
| public int | Returns: The number of bytes actually peekedan index, byte[] int valueThe byte array to peek into b, int The offset into the array to start peeking offset, int an length)int value
|
| public int | |
| public void | |
| public int | Returns: The number of bytes actually pokedan index, byte[] int valuea b, int offset, int length)byte array valuePut a specific byte to a specific getIndex. |
| public int | |
| public void | |
| public int | Returns: The number of bytes actually pokeda b, int offset, int length)byte valuePut a byte to the current getIndex and increment the getIndex. |
| public int | Returns: The number of bytes actually pokeda b)byte valuePut a byte to the current getIndex and increment the getIndex. |
| public int | Returns: anint value >= getIndex()The index of the first element that should not be read. |
| public int | Returns: actual number of bytes read or -1 for EOFinput stream in, int maximum number of bytes that may be read max)Read the buffer's contents from the input stream |
| public void | |
| public void | |
| public void | |
| public void | |
| public int | |
| public Buffer | |
| public Buffer | |
| public Buffer | Returns: a valitileBuffer value from the mark of the length requested.an length)int value
|
| public int | |
| public String | |
| public void |
| IMMUTABLE | back to summary |
|---|---|
| public static final int IMMUTABLE | |
| NON_VOLATILE | back to summary |
|---|---|
| public static final boolean NON_VOLATILE | |
| READONLY | back to summary |
|---|---|
| public static final int READONLY | |
| READWRITE | back to summary |
|---|---|
| public static final int READWRITE | |
| VOLATILE | back to summary |
|---|---|
| public static final boolean VOLATILE | |
| array | back to summary |
|---|---|
| public byte[] array() Get the underlying array, if one exists.
| |
| asArray | back to summary |
|---|---|
public byte[] asArray()
| |
| asImmutableBuffer | back to summary |
|---|---|
public Buffer asImmutableBuffer()
| |
| asMutableBuffer | back to summary |
|---|---|
public Buffer asMutableBuffer()
| |
| asNonVolatileBuffer | back to summary |
|---|---|
public Buffer asNonVolatileBuffer()
| |
| asReadOnlyBuffer | back to summary |
|---|---|
public Buffer asReadOnlyBuffer()
| |
| buffer | back to summary |
|---|---|
| public Buffer buffer() Get the unerlying buffer. If this buffer wraps a backing buffer.
| |
| capacity | back to summary |
|---|---|
| public int capacity() The capacity of the buffer. This is the maximum putIndex that may be set.
| |
| clear | back to summary |
|---|---|
| public void clear() Clear the buffer. getIndex=0, putIndex=0. | |
| compact | back to summary |
|---|---|
| public void compact() Compact the buffer by discarding bytes before the postion (or mark if set). Bytes from the getIndex (or mark) to the putIndex are moved to the beginning of the buffer and the values adjusted accordingly. | |
| equalsIgnoreCase | back to summary |
|---|---|
public boolean equalsIgnoreCase(Buffer buffer)
| |
| get | back to summary |
|---|---|
| public byte get() Get the byte at the current getIndex and increment it.
| |
| get | back to summary |
|---|---|
| public int get(byte[] b, int offset, int length) Get bytes from the current postion and put them into the passed byte array. The getIndex is incremented by the number of bytes copied into the array.
| |
| get | back to summary |
|---|---|
public Buffer get(int length)
| |
| getIndex | back to summary |
|---|---|
| public int getIndex() The index within the buffer that will next be read or written.
| |
| hasContent | back to summary |
|---|---|
public boolean hasContent()
| |
| isImmutable | back to summary |
|---|---|
public boolean isImmutable()
| |
| isReadOnly | back to summary |
|---|---|
public boolean isReadOnly()
| |
| isVolatile | back to summary |
|---|---|
public boolean isVolatile()
| |
| length | back to summary |
|---|---|
| public int length() The number of bytes from the getIndex to the putIndex
| |
| mark | back to summary |
|---|---|
| public void mark() Set the mark to the current getIndex. | |
| mark | back to summary |
|---|---|
| public void mark(int offset) Set the mark relative to the current getIndex
| |
| markIndex | back to summary |
|---|---|
| public int markIndex() The current index of the mark.
| |
| peek | back to summary |
|---|---|
| public byte peek() Get the byte at the current getIndex without incrementing the getIndex.
| |
| peek | back to summary |
|---|---|
| public byte peek(int index) Get the byte at a specific index in the buffer.
| |
| peek | back to summary |
|---|---|
public Buffer peek(int index, int length)
| |
| peek | back to summary |
|---|---|
public int peek(int index, byte[] b, int offset, int length)
| |
| poke | back to summary |
|---|---|
| public int poke(int index, Buffer src) Put the contents of the buffer at the specific index.
| |
| poke | back to summary |
|---|---|
| public void poke(int index, byte b) Put a specific byte to a specific getIndex.
| |
| poke | back to summary |
|---|---|
| public int poke(int index, byte[] b, int offset, int length) Put a specific byte to a specific getIndex.
| |
| put | back to summary |
|---|---|
| public int put(Buffer src) Write the bytes from the source buffer to the current getIndex.
| |
| put | back to summary |
|---|---|
| public void put(byte b) Put a byte to the current getIndex and increment the getIndex.
| |
| put | back to summary |
|---|---|
| public int put(byte[] b, int offset, int length) Put a byte to the current getIndex and increment the getIndex.
| |
| put | back to summary |
|---|---|
| public int put(byte[] b) Put a byte to the current getIndex and increment the getIndex.
| |
| putIndex | back to summary |
|---|---|
| public int putIndex() The index of the first element that should not be read.
| |
| readFrom | back to summary |
|---|---|
| public int readFrom(InputStream in, int max) throws IOException Read the buffer's contents from the input stream
| |
| reset | back to summary |
|---|---|
| public void reset() Reset the current getIndex to the mark | |
| setGetIndex | back to summary |
|---|---|
| public void setGetIndex(int newStart) Set the buffers start getIndex.
| |
| setMarkIndex | back to summary |
|---|---|
| public void setMarkIndex(int newMark) Set a specific value for the mark.
| |
| setPutIndex | back to summary |
|---|---|
public void setPutIndex(int newLimit)
| |
| skip | back to summary |
|---|---|
| public int skip(int n) Skip _content. The getIndex is updated by min(remaining(), n)
| |
| slice | back to summary |
|---|---|
public Buffer slice()
| |
| sliceFromMark | back to summary |
|---|---|
public Buffer sliceFromMark()
| |
| sliceFromMark | back to summary |
|---|---|
public Buffer sliceFromMark(int length)
| |
| space | back to summary |
|---|---|
| public int space() the space remaining in the buffer.
| |
| toDetailString | back to summary |
|---|---|
public String toDetailString()
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(OutputStream out) throws IOException Write the buffer's contents to the output stream | |