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, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asArray, 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, writeTo
public RandomAccessFileBuffer(File file) throws FileNotFoundException
FileNotFoundException
public RandomAccessFileBuffer(File file, int capacity) throws FileNotFoundException
FileNotFoundException
public RandomAccessFileBuffer(File file, int capacity, int access) throws FileNotFoundException
FileNotFoundException
public byte[] array()
Buffer
public int capacity()
Buffer
public void clear()
Buffer
clear
in interface Buffer
clear
in class AbstractBuffer
public byte peek()
Buffer
peek
in interface Buffer
peek
in class AbstractBuffer
byte
value from the current getIndex.public byte peek(int index)
Buffer
public int peek(int index, byte[] b, int offset, int length)
public void poke(int index, byte b)
Buffer
public int poke(int index, byte[] b, int offset, int length)
Buffer
poke
in interface Buffer
poke
in class AbstractBuffer
index
- an int
valueb
- a byte array
valuepublic int writeTo(WritableByteChannel channel, int index, int length) throws IOException
IOException
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.