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.Buffer 继承的嵌套类/接口
Buffer.CaseInsensitve
 
字段摘要
 
从类 org.eclipse.jetty.io.AbstractBuffer 继承的字段
__IMMUTABLE, __READONLY, __READWRITE, __VOLATILE, _access, _get, _hash, _hashGet, _hashPut, _mark, _put, _string, _view, _volatile
 
从接口 org.eclipse.jetty.io.Buffer 继承的字段
IMMUTABLE, NON_VOLATILE, READONLY, READWRITE, VOLATILE
 
构造方法摘要
RandomAccessFileBuffer(File file)
           
RandomAccessFileBuffer(File file, int capacity)
           
RandomAccessFileBuffer(File file, int capacity, int access)
           
 
方法摘要
 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
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
从接口 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 value
b - The byte array to peek into
offset - The offset into the array to start peeking
length - 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 value
b - 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 value
b - 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.