org.eclipse.jetty.io.nio
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(java.io.File file) |
RandomAccessFileBuffer(java.io.File file,
int capacity) |
RandomAccessFileBuffer(java.io.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(java.nio.channels.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, 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, writeTo
public RandomAccessFileBuffer(java.io.File file) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public RandomAccessFileBuffer(java.io.File file, int capacity) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public RandomAccessFileBuffer(java.io.File file, int capacity, int access) throws java.io.FileNotFoundException
java.io.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(java.nio.channels.WritableByteChannel channel, int index, int length) throws java.io.IOException
java.io.IOException
Copyright © 2013. All Rights Reserved.