|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.io.AbstractBuffer
public abstract class AbstractBuffer
| 嵌套类摘要 |
|---|
| 从接口 org.eclipse.jetty.io.Buffer 继承的嵌套类/接口 |
|---|
Buffer.CaseInsensitve |
| 字段摘要 | |
|---|---|
protected static String |
__IMMUTABLE
|
protected static String |
__READONLY
|
protected static String |
__READWRITE
|
protected static String |
__VOLATILE
|
protected int |
_access
|
protected int |
_get
|
protected int |
_hash
|
protected int |
_hashGet
|
protected int |
_hashPut
|
protected int |
_mark
|
protected int |
_put
|
protected String |
_string
|
protected View |
_view
|
protected boolean |
_volatile
|
| 从接口 org.eclipse.jetty.io.Buffer 继承的字段 |
|---|
IMMUTABLE, NON_VOLATILE, READONLY, READWRITE, VOLATILE |
| 构造方法摘要 | |
|---|---|
AbstractBuffer(int access,
boolean isVolatile)
Constructor for BufferView |
|
| 方法摘要 | |
|---|---|
byte[] |
asArray()
|
Buffer |
asImmutableBuffer()
|
Buffer |
asMutableBuffer()
|
Buffer |
asNonVolatileBuffer()
|
Buffer |
asReadOnlyBuffer()
|
Buffer |
buffer()
Get the underlying buffer. |
void |
clear()
Clear the buffer. getIndex=0, putIndex=0. |
void |
compact()
Compact the buffer by discarding bytes before the postion (or mark if set). |
ByteArrayBuffer |
duplicate(int access)
|
boolean |
equals(Object obj)
|
boolean |
equalsIgnoreCase(Buffer b)
|
byte |
get()
Get the byte at the current getIndex and increment it. |
int |
get(byte[] b,
int offset,
int length)
Get bytes from the current postion and put them into the passed byte array. |
Buffer |
get(int length)
|
int |
getIndex()
The index within the buffer that will next be read or written. |
boolean |
hasContent()
|
int |
hashCode()
|
boolean |
isImmutable()
|
boolean |
isReadOnly()
|
boolean |
isVolatile()
|
int |
length()
The number of bytes from the getIndex to the putIndex |
void |
mark()
Set the mark to the current getIndex. |
void |
mark(int offset)
Set the mark relative to the current getIndex |
int |
markIndex()
The current index of the mark. |
byte |
peek()
Get the byte at the current getIndex without incrementing the getIndex. |
Buffer |
peek(int index,
int length)
|
int |
poke(int index,
Buffer src)
Put the contents of the buffer at the specific index. |
int |
poke(int index,
byte[] b,
int offset,
int length)
Put a specific byte to a specific getIndex. |
int |
put(Buffer src)
Write the bytes from the source buffer to the current getIndex. |
void |
put(byte b)
Put a byte to the current getIndex and increment the getIndex. |
int |
put(byte[] b)
Put a byte to the current getIndex and increment the getIndex. |
int |
put(byte[] b,
int offset,
int length)
Put a byte to the current getIndex and increment the getIndex. |
int |
putIndex()
The index of the first element that should not be read. |
int |
readFrom(InputStream in,
int max)
Read the buffer's contents from the input stream |
void |
reset()
Reset the current getIndex to the mark |
void |
rewind()
|
void |
setGetIndex(int getIndex)
Set the buffers start getIndex. |
void |
setMarkIndex(int index)
Set a specific value for the mark. |
void |
setPutIndex(int putIndex)
|
int |
skip(int n)
Skip _content. |
Buffer |
slice()
|
Buffer |
sliceFromMark()
|
Buffer |
sliceFromMark(int length)
|
int |
space()
the space remaining in the buffer. |
String |
toDebugString()
|
String |
toDetailString()
|
String |
toString()
|
String |
toString(Charset charset)
|
String |
toString(String charset)
|
void |
writeTo(OutputStream out)
Write the buffer's contents to the output stream |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| 从接口 org.eclipse.jetty.io.Buffer 继承的方法 |
|---|
array, capacity, peek, peek, poke |
| 字段详细信息 |
|---|
protected static final String __IMMUTABLE
protected static final String __READONLY
protected static final String __READWRITE
protected static final String __VOLATILE
protected int _access
protected boolean _volatile
protected int _get
protected int _put
protected int _hash
protected int _hashGet
protected int _hashPut
protected int _mark
protected String _string
protected View _view
| 构造方法详细信息 |
|---|
public AbstractBuffer(int access,
boolean isVolatile)
access - 0==IMMUTABLE, 1==READONLY, 2==READWRITE| 方法详细信息 |
|---|
public byte[] asArray()
Buffer 中的 asArraybyte[] value of the bytes from the getIndex to the putIndex.public ByteArrayBuffer duplicate(int access)
public Buffer asNonVolatileBuffer()
Buffer 中的 asNonVolatileBufferBuffer valuepublic Buffer asImmutableBuffer()
Buffer 中的 asImmutableBufferBuffer.public Buffer asReadOnlyBuffer()
Buffer 中的 asReadOnlyBufferBuffer.public Buffer asMutableBuffer()
Buffer 中的 asMutableBufferBuffer.public Buffer buffer()
Buffer 复制的描述
Buffer 中的 bufferpublic void clear()
Buffer 复制的描述
Buffer 中的 clearpublic void compact()
Buffer 复制的描述
Buffer 中的 compactpublic boolean equals(Object obj)
Object 中的 equalspublic boolean equalsIgnoreCase(Buffer b)
Buffer 中的 equalsIgnoreCaseboolean value true if case sensitive comparison on this bufferpublic byte get()
Buffer 复制的描述
Buffer 中的 getbyte value from the current getIndex.
public int get(byte[] b,
int offset,
int length)
Buffer 复制的描述
Buffer 中的 getb - The byte array to fill.offset - Offset in the array.length - The max number of bytes to read.
public Buffer get(int length)
Buffer 中的 getlength - an int value
Buffer valuepublic final int getIndex()
Buffer 复制的描述
Buffer 中的 getIndexint value >=0 <= putIndex()public boolean hasContent()
Buffer 中的 hasContentpublic int hashCode()
Object 中的 hashCodepublic boolean isImmutable()
Buffer 中的 isImmutableboolean value true if the buffer is immutable and that neither
the buffer contents nor the indexes may be changed.public boolean isReadOnly()
Buffer 中的 isReadOnlyboolean value true if the buffer is readonly. The buffer indexes may
be modified, but the buffer contents may not. For example a View onto an immutable Buffer will be
read only.public boolean isVolatile()
Buffer 中的 isVolatileboolean value true if the buffer contents may change
via alternate paths than this buffer. If the contents of this buffer are to be used outside of the
current context, then a copy must be made.public int length()
Buffer 复制的描述
Buffer 中的 lengthint == putIndex()-getIndex()public void mark()
Buffer 复制的描述
Buffer 中的 markpublic void mark(int offset)
Buffer 复制的描述
Buffer 中的 markoffset - an int value to add to the current getIndex to obtain the mark value.public int markIndex()
Buffer 复制的描述
Buffer 中的 markIndexint index in the buffer or -1 if the mark is not set.public byte peek()
Buffer 复制的描述
Buffer 中的 peekbyte value from the current getIndex.
public Buffer peek(int index,
int length)
Buffer 中的 peekindex - an int valuelength - an int value
Buffer value from the requested getIndex.
public int poke(int index,
Buffer src)
Buffer 复制的描述
Buffer 中的 pokeindex - an int valuesrc - a Buffer. If the source buffer is not modified
public int poke(int index,
byte[] b,
int offset,
int length)
Buffer 复制的描述
Buffer 中的 pokeindex - an int valueb - a byte array value
public int put(Buffer src)
Buffer 复制的描述
Buffer 中的 putsrc - The source Buffer it is not modified.
public void put(byte b)
Buffer 复制的描述
Buffer 中的 putb - a byte value
public int put(byte[] b,
int offset,
int length)
Buffer 复制的描述
Buffer 中的 putb - a byte value
public int put(byte[] b)
Buffer 复制的描述
Buffer 中的 putb - a byte value
public final int putIndex()
Buffer 复制的描述
Buffer 中的 putIndexint value >= getIndex()public void reset()
Buffer 复制的描述
Buffer 中的 resetpublic void rewind()
public void setGetIndex(int getIndex)
Buffer 复制的描述
Buffer 中的 setGetIndexgetIndex - an int valuepublic void setMarkIndex(int index)
Buffer 复制的描述
Buffer 中的 setMarkIndexindex - an int valuepublic void setPutIndex(int putIndex)
Buffer 中的 setPutIndexputIndex - an int valuepublic int skip(int n)
Buffer 复制的描述
Buffer 中的 skipn - The number of bytes to skip
public Buffer slice()
Buffer 中的 sliceBuffer from the postion to the putIndex.public Buffer sliceFromMark()
Buffer 中的 sliceFromMarkBuffer value from the mark to the putIndexpublic Buffer sliceFromMark(int length)
Buffer 中的 sliceFromMarklength - an int value
Buffer value from the mark of the length requested.public int space()
Buffer 复制的描述
Buffer 中的 spacepublic String toDetailString()
Buffer 中的 toDetailStringString value describing the state and contents of the buffer.public String toString()
Object 中的 toStringpublic String toString(String charset)
Buffer 中的 toStringpublic String toString(Charset charset)
Buffer 中的 toStringpublic String toDebugString()
public void writeTo(OutputStream out)
throws IOException
Buffer 复制的描述
Buffer 中的 writeToIOException
public int readFrom(InputStream in,
int max)
throws IOException
Buffer 复制的描述
Buffer 中的 readFromin - input streammax - maximum number of bytes that may be read
IOException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||