org.eclipse.jetty.io.nio
类 RandomAccessFileBuffer
java.lang.Object
org.eclipse.jetty.io.AbstractBuffer
org.eclipse.jetty.io.nio.RandomAccessFileBuffer
- 所有已实现的接口:
- Cloneable, Buffer
public class RandomAccessFileBuffer
- extends AbstractBuffer
- implements Buffer
| 从类 org.eclipse.jetty.io.AbstractBuffer 继承的字段 |
__IMMUTABLE, __READONLY, __READWRITE, __VOLATILE, _access, _get, _hash, _hashGet, _hashPut, _mark, _put, _string, _view, _volatile |
|
方法摘要 |
byte[] |
array()
Get the underlying array, if one exists. |
int |
capacity()
The capacity of the buffer. |
void |
clear()
Clear the buffer. getIndex=0, putIndex=0. |
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)
|
| 从类 org.eclipse.jetty.io.AbstractBuffer 继承的方法 |
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 |
| 从接口 org.eclipse.jetty.io.Buffer 继承的方法 |
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 |
RandomAccessFileBuffer
public RandomAccessFileBuffer(File file)
throws FileNotFoundException
- 抛出:
FileNotFoundException
RandomAccessFileBuffer
public RandomAccessFileBuffer(File file,
int capacity)
throws FileNotFoundException
- 抛出:
FileNotFoundException
RandomAccessFileBuffer
public RandomAccessFileBuffer(File file,
int capacity,
int access)
throws FileNotFoundException
- 抛出:
FileNotFoundException
array
public byte[] array()
- 从接口
Buffer 复制的描述
- Get the underlying array, if one exists.
- 指定者:
- 接口
Buffer 中的 array
- 返回:
- a
byte[] backing this buffer or null if none exists.
capacity
public int capacity()
- 从接口
Buffer 复制的描述
- The capacity of the buffer. This is the maximum putIndex that may be set.
- 指定者:
- 接口
Buffer 中的 capacity
- 返回:
- an
int value
clear
public void clear()
- 从接口
Buffer 复制的描述
- Clear the buffer. getIndex=0, putIndex=0.
- 指定者:
- 接口
Buffer 中的 clear - 覆盖:
- 类
AbstractBuffer 中的 clear
peek
public byte peek()
- 从接口
Buffer 复制的描述
- Get the byte at the current getIndex without incrementing the getIndex.
- 指定者:
- 接口
Buffer 中的 peek - 覆盖:
- 类
AbstractBuffer 中的 peek
- 返回:
- The
byte value from the current getIndex.
peek
public byte peek(int index)
- 从接口
Buffer 复制的描述
- Get the byte at a specific index in the buffer.
- 指定者:
- 接口
Buffer 中的 peek
- 参数:
index - an int value
- 返回:
- a
byte value
peek
public int peek(int index,
byte[] b,
int offset,
int length)
- 指定者:
- 接口
Buffer 中的 peek
- 参数:
index - an int valueb - The byte array to peek intooffset - The offset into the array to start peekinglength - an int value
- 返回:
- The number of bytes actually peeked
poke
public void poke(int index,
byte b)
- 从接口
Buffer 复制的描述
- Put a specific byte to a specific getIndex.
- 指定者:
- 接口
Buffer 中的 poke
- 参数:
index - an int valueb - a byte value
poke
public int poke(int index,
byte[] b,
int offset,
int length)
- 从接口
Buffer 复制的描述
- Put a specific byte to a specific getIndex.
- 指定者:
- 接口
Buffer 中的 poke - 覆盖:
- 类
AbstractBuffer 中的 poke
- 参数:
index - an int valueb - a byte array value
- 返回:
- The number of bytes actually poked
writeTo
public int writeTo(WritableByteChannel channel,
int index,
int length)
throws IOException
- 抛出:
IOException
Copyright © 2013. All Rights Reserved.