public class View extends AbstractBuffer
| Modifier and Type | Class and Description |
|---|---|
static class |
View.CaseInsensitive |
Buffer.CaseInsensitve__IMMUTABLE, __READONLY, __READWRITE, __VOLATILE, _access, _get, _hash, _hashGet, _hashPut, _mark, _put, _string, _view, _volatile| Constructor and Description |
|---|
View() |
View(Buffer buffer) |
View(Buffer buffer,
int mark,
int get,
int put,
int access) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array()
Get the underlying array, if one exists.
|
Buffer |
buffer()
Get the underlying buffer.
|
int |
capacity()
The capacity of the buffer.
|
void |
clear()
Clear the buffer.
|
void |
compact()
Compact the buffer by discarding bytes before the postion (or mark if set).
|
boolean |
equals(Object obj) |
boolean |
isReadOnly() |
boolean |
isVolatile() |
byte |
peek(int index)
Get the byte at a specific index in the buffer.
|
int |
peek(int index,
byte[] b,
int offset,
int length) |
Buffer |
peek(int index,
int length) |
int |
poke(int index,
Buffer src)
Put the contents of the buffer at the specific index.
|
void |
poke(int index,
byte b)
Put a specific byte to a specific getIndex.
|
int |
poke(int index,
byte[] b,
int offset,
int length)
Put a specific byte to a specific getIndex.
|
String |
toString() |
void |
update(Buffer buffer)
Update view to buffer
|
void |
update(int get,
int put) |
asArray, asImmutableBuffer, asMutableBuffer, asNonVolatileBuffer, asReadOnlyBuffer, duplicate, equalsIgnoreCase, get, get, get, getIndex, hasContent, hashCode, isImmutable, length, mark, mark, markIndex, peek, put, put, put, put, putIndex, readFrom, reset, rewind, setGetIndex, setMarkIndex, setPutIndex, skip, slice, sliceFromMark, sliceFromMark, space, toDebugString, toDetailString, toString, toString, writeTopublic View(Buffer buffer, int mark, int get, int put, int access)
buffer - The Buffer on which we are presenting a View.mark - The initial value of the mark indexget - The initial value of the get indexput - The initial value of the put indexaccess - The access level - one of the constants from Buffer.public View(Buffer buffer)
public View()
public void update(Buffer buffer)
public void update(int get,
int put)
public byte[] array()
BufferBuffer.array() from the underlying buffer.public Buffer buffer()
Bufferbuffer in interface Bufferbuffer in class AbstractBufferBuffer.buffer() from the underlying buffer.public int capacity()
BufferBuffer.capacity() of the underlying buffer.public void clear()
Bufferclear in interface Bufferclear in class AbstractBufferpublic void compact()
Buffercompact in interface Buffercompact in class AbstractBufferpublic boolean equals(Object obj)
equals in class AbstractBufferpublic boolean isReadOnly()
isReadOnly in interface BufferisReadOnly in class AbstractBufferread onlypublic boolean isVolatile()
isVolatile in interface BufferisVolatile in class AbstractBuffervolatilepublic byte peek(int index)
Bufferindex - an int valueBuffer.peek(int) on the underlying bufferpublic int peek(int index,
byte[] b,
int offset,
int length)
index - an int valueb - The byte array to peek intooffset - The offset into the array to start peekinglength - an int valueBuffer.peek(int, byte[], int, int) on the underlying bufferpublic Buffer peek(int index, int length)
peek in interface Bufferpeek in class AbstractBufferindex - an int valuelength - an int valueBuffer.peek(int, int) on the underlying bufferpublic int poke(int index,
Buffer src)
Bufferpoke in interface Bufferpoke in class AbstractBufferindex - src - public void poke(int index,
byte b)
Bufferindex - b - public int poke(int index,
byte[] b,
int offset,
int length)
Bufferpoke in interface Bufferpoke in class AbstractBufferindex - b - offset - length - public String toString()
toString in class AbstractBufferCopyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.