|
|||||||||||
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.ByteArrayBuffer
Nested Class Summary | |
static class |
ByteArrayBuffer.CaseInsensitive
|
Nested classes inherited from class org.mortbay.io.Buffer |
Buffer.CaseInsensitve |
Field Summary |
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 | |
ByteArrayBuffer(byte[] bytes)
|
|
ByteArrayBuffer(byte[] bytes,
int index,
int length)
|
|
ByteArrayBuffer(byte[] bytes,
int index,
int length,
int access)
|
|
ByteArrayBuffer(byte[] bytes,
int index,
int length,
int access,
boolean isVolatile)
|
|
ByteArrayBuffer(int size)
|
|
ByteArrayBuffer(String value)
|
Method Summary | |
byte[] |
array()
Get the underlying array, if one exists. |
int |
capacity()
The capacity of the buffer. |
byte |
get()
Get the byte at the current getIndex and increment it. |
byte |
peek(int index)
Get the byte at a specific index in the buffer. |
int |
peek(int index,
byte[] b,
int offset,
int length)
|
void |
poke(int index,
byte b)
Put a specific byte to a specific getIndex. |
void |
wrap(byte[] b)
Wrap a byte array |
void |
wrap(byte[] b,
int off,
int len)
Wrap a byte array. |
Methods inherited from class org.mortbay.io.AbstractBuffer |
asArray, asImmutableBuffer, asMutableBuffer, asNonVolatileBuffer, asReadOnlyBuffer, buffer, clear, compact, duplicate, equals, equalsIgnoreCase, get, get, getIndex, hasContent, hashCode, isImmutable, isReadOnly, isVolatile, length, mark, mark, markIndex, peek, peek, poke, poke, 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 |
Constructor Detail |
public ByteArrayBuffer(byte[] bytes)
public ByteArrayBuffer(byte[] bytes, int index, int length)
public ByteArrayBuffer(byte[] bytes, int index, int length, int access)
public ByteArrayBuffer(byte[] bytes, int index, int length, int access, boolean isVolatile)
public ByteArrayBuffer(int size)
public ByteArrayBuffer(String value)
Method Detail |
public byte[] array()
Buffer
byte[]
backing this buffer or null if none exists.public int capacity()
Buffer
int
valuepublic byte get()
Buffer
get
in interface Buffer
get
in class AbstractBuffer
public byte peek(int index)
Buffer
index
- an int
value
byte
valuepublic 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
value
public void poke(int index, byte b)
Buffer
index
- an int
valueb
- a byte
valuepublic void wrap(byte[] b, int off, int len)
b
- off
- len
- public void wrap(byte[] b)
b
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |