|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mortbay.io.AbstractBuffer org.mortbay.io.View
public class View
A View on another buffer. Allows operations that do not change the _content or indexes of the backing buffer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.mortbay.io.Buffer |
---|
Buffer.CaseInsensitve |
Field Summary | |
---|---|
(package private) Buffer |
_buffer
|
Fields inherited from class org.mortbay.io.AbstractBuffer |
---|
__IMMUTABLE, __READONLY, __READWRITE, __VOLATILE, _access, _get, _hash, _put, _string, _volatile |
Fields inherited from interface org.mortbay.io.Buffer |
---|
IMMUTABLE, NON_VOLATILE, READONLY, READWRITE, VOLATILE |
Constructor Summary | |
---|---|
View(Buffer buffer)
|
|
View(Buffer buffer,
int mark,
int get,
int put,
int access)
|
Method Summary | |
---|---|
byte[] |
array()
Get the underlying array, if one exists. |
Buffer |
buffer()
Get the unerlying 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 arg0)
|
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. |
void |
update(Buffer buffer)
Update view to buffer |
void |
update(int get,
int put)
|
Methods inherited from class org.mortbay.io.AbstractBuffer |
---|
asArray, asImmutableBuffer, asMutableBuffer, asNonVolatileBuffer, asReadOnlyBuffer, duplicate, equalsIgnoreCase, get, get, get, getIndex, hasContent, hashCode, isImmutable, length, mark, mark, markIndex, peek, put, put, put, put, putIndex, reset, rewind, setGetIndex, setMarkIndex, setPutIndex, skip, slice, sliceFromMark, sliceFromMark, space, toDetailString, toString, writeTo |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
Buffer _buffer
Constructor Detail |
---|
public View(Buffer buffer, int mark, int get, int put, int access)
buffer
- mark
- get
- put
- readonly
- b
- public View(Buffer buffer)
Method Detail |
---|
public void update(Buffer buffer)
public void update(int get, int put)
public byte[] array()
Buffer
public Buffer buffer()
Buffer
buffer
in interface Buffer
buffer
in class AbstractBuffer
public int capacity()
Buffer
public void clear()
Buffer
clear
in interface Buffer
clear
in class AbstractBuffer
public void compact()
Buffer
compact
in interface Buffer
compact
in class AbstractBuffer
public boolean equals(Object arg0)
equals
in class AbstractBuffer
public boolean isReadOnly()
isReadOnly
in interface Buffer
isReadOnly
in class AbstractBuffer
public boolean isVolatile()
isVolatile
in interface Buffer
isVolatile
in class AbstractBuffer
public byte peek(int index)
Buffer
index
-
public int peek(int index, byte[] b, int offset, int length)
index
- length
- b
- The byte array to peek intooffset
- The offset into the array to start peeking
public Buffer peek(int index, int length)
peek
in interface Buffer
peek
in class AbstractBuffer
index
- length
-
public int poke(int index, Buffer src)
Buffer
poke
in interface Buffer
poke
in class AbstractBuffer
index
- src
-
public void poke(int index, byte b)
Buffer
index
- b
- public int poke(int index, byte[] b, int offset, int length)
Buffer
poke
in interface Buffer
poke
in class AbstractBuffer
index
- b
- offset
- length
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |