public class RandomAccessFileBuffer extends AbstractBuffer implements Buffer
Buffer.CaseInsensitve__IMMUTABLE, __READONLY, __READWRITE, __VOLATILE, _access, _get, _hash, _hashGet, _hashPut, _mark, _put, _string, _view, _volatile| Constructor and Description |
|---|
RandomAccessFileBuffer(File file) |
RandomAccessFileBuffer(File file,
int capacity) |
RandomAccessFileBuffer(File file,
int capacity,
int access) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array()
Get the underlying array, if one exists.
|
int |
capacity()
The capacity of the buffer.
|
void |
clear()
Clear the buffer.
|
byte |
peek()
Get the byte at the current getIndex without incrementing the getIndex.
|
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.
|
int |
poke(int index,
byte[] b,
int offset,
int length)
Put a specific byte to a specific getIndex.
|
int |
writeTo(WritableByteChannel channel,
int index,
int length) |
asArray, asImmutableBuffer, asMutableBuffer, asNonVolatileBuffer, asReadOnlyBuffer, buffer, compact, duplicate, equals, equalsIgnoreCase, get, get, get, getIndex, hasContent, hashCode, isImmutable, isReadOnly, isVolatile, length, mark, mark, markIndex, peek, poke, put, put, put, put, putIndex, readFrom, reset, rewind, setGetIndex, setMarkIndex, setPutIndex, skip, slice, sliceFromMark, sliceFromMark, space, toDebugString, toDetailString, toString, toString, toString, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitasArray, asImmutableBuffer, asMutableBuffer, asNonVolatileBuffer, asReadOnlyBuffer, buffer, compact, equalsIgnoreCase, get, get, get, getIndex, hasContent, isImmutable, isReadOnly, isVolatile, length, mark, mark, markIndex, peek, poke, put, put, put, put, putIndex, readFrom, reset, setGetIndex, setMarkIndex, setPutIndex, skip, slice, sliceFromMark, sliceFromMark, space, toDetailString, toString, toString, writeTopublic RandomAccessFileBuffer(File file) throws FileNotFoundException
FileNotFoundExceptionpublic RandomAccessFileBuffer(File file, int capacity) throws FileNotFoundException
FileNotFoundExceptionpublic RandomAccessFileBuffer(File file, int capacity, int access) throws FileNotFoundException
FileNotFoundExceptionpublic byte[] array()
Bufferpublic int capacity()
Bufferpublic void clear()
Bufferclear in interface Bufferclear in class AbstractBufferpublic byte peek()
Bufferpeek in interface Bufferpeek in class AbstractBufferbyte value from the current getIndex.public byte peek(int index)
Bufferpublic int peek(int index,
byte[] b,
int offset,
int length)
public void poke(int index,
byte b)
Bufferpublic int poke(int index,
byte[] b,
int offset,
int length)
Bufferpoke in interface Bufferpoke in class AbstractBufferindex - an int valueb - a byte array valuepublic int writeTo(WritableByteChannel channel, int index, int length) throws IOException
IOExceptionCopyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.