org.eclipse.jetty.io
类 View

java.lang.Object
  继承者 org.eclipse.jetty.io.AbstractBuffer
      继承者 org.eclipse.jetty.io.View
所有已实现的接口:
Cloneable, Buffer
直接已知子类:
View.CaseInsensitive

public class View
extends AbstractBuffer

A View on another buffer. Allows operations that do not change the _content or indexes of the backing buffer.


嵌套类摘要
static class View.CaseInsensitive
           
 
从接口 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
 
构造方法摘要
View()
           
View(Buffer buffer)
           
View(Buffer buffer, int mark, int get, int put, int access)
           
 
方法摘要
 byte[] array()
          Get the underlying array, if one exists.
 Buffer buffer()
          Get the underlying buffer.
 int capacity()
          The capacity of the 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).
 boolean equals(Object obj)
           
 boolean isReadOnly()
           
 boolean isVolatile()
           
 byte peek(int index)
          Get the byte at a specific index in the buffer.
 int peek(int index, byte[] b, int offset, int length)
           
 Buffer peek(int index, int length)
           
 int poke(int index, Buffer src)
          Put the contents of the buffer at the specific index.
 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.
 String toString()
           
 void update(Buffer buffer)
          Update view to buffer
 void update(int get, int put)
           
 
从类 org.eclipse.jetty.io.AbstractBuffer 继承的方法
asArray, asImmutableBuffer, asMutableBuffer, asNonVolatileBuffer, asReadOnlyBuffer, duplicate, equalsIgnoreCase, get, get, get, getIndex, hasContent, hashCode, isImmutable, length, mark, mark, markIndex, peek, put, put, put, put, putIndex, readFrom, reset, rewind, setGetIndex, setMarkIndex, setPutIndex, skip, slice, sliceFromMark, sliceFromMark, space, toDebugString, toDetailString, toString, toString, writeTo
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

View

public View(Buffer buffer,
            int mark,
            int get,
            int put,
            int access)
参数:
buffer - The Buffer on which we are presenting a View.
mark - The initial value of the mark index
get - The initial value of the get index
put - The initial value of the put index
access - The access level - one of the constants from Buffer.

View

public View(Buffer buffer)

View

public View()
方法详细信息

update

public void update(Buffer buffer)
Update view to buffer


update

public void update(int get,
                   int put)

array

public byte[] array()
从接口 Buffer 复制的描述
Get the underlying array, if one exists.

返回:
The Buffer.array() from the underlying buffer.

buffer

public Buffer buffer()
从接口 Buffer 复制的描述
Get the underlying buffer. If this buffer wraps a backing buffer.

指定者:
接口 Buffer 中的 buffer
覆盖:
AbstractBuffer 中的 buffer
返回:
The Buffer.buffer() from the underlying buffer.

capacity

public int capacity()
从接口 Buffer 复制的描述
The capacity of the buffer. This is the maximum putIndex that may be set.

返回:
The Buffer.capacity() of the underlying buffer.

clear

public void clear()
从接口 Buffer 复制的描述
Clear the buffer. getIndex=0, putIndex=0.

指定者:
接口 Buffer 中的 clear
覆盖:
AbstractBuffer 中的 clear

compact

public void compact()
从接口 Buffer 复制的描述
Compact the buffer by discarding bytes before the postion (or mark if set). Bytes from the getIndex (or mark) to the putIndex are moved to the beginning of the buffer and the values adjusted accordingly.

指定者:
接口 Buffer 中的 compact
覆盖:
AbstractBuffer 中的 compact

equals

public boolean equals(Object obj)
覆盖:
AbstractBuffer 中的 equals

isReadOnly

public boolean isReadOnly()
指定者:
接口 Buffer 中的 isReadOnly
覆盖:
AbstractBuffer 中的 isReadOnly
返回:
Whether the underlying buffer is read only

isVolatile

public boolean isVolatile()
指定者:
接口 Buffer 中的 isVolatile
覆盖:
AbstractBuffer 中的 isVolatile
返回:
Whether the underlying buffer is volatile

peek

public byte peek(int index)
从接口 Buffer 复制的描述
Get the byte at a specific index in the buffer.

参数:
index - an int value
返回:
The result of calling Buffer.peek(int) on the underlying buffer

peek

public int peek(int index,
                byte[] b,
                int offset,
                int length)
参数:
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 result of calling Buffer.peek(int, byte[], int, int) on the underlying buffer

peek

public Buffer peek(int index,
                   int length)
指定者:
接口 Buffer 中的 peek
覆盖:
AbstractBuffer 中的 peek
参数:
index - an int value
length - an int value
返回:
The result of calling Buffer.peek(int, int) on the underlying buffer

poke

public int poke(int index,
                Buffer src)
从接口 Buffer 复制的描述
Put the contents of the buffer at the specific index.

指定者:
接口 Buffer 中的 poke
覆盖:
AbstractBuffer 中的 poke
参数:
index -
src -
返回:
The number of bytes actually poked

poke

public void poke(int index,
                 byte b)
从接口 Buffer 复制的描述
Put a specific byte to a specific getIndex.

参数:
index -
b -

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 -
b -
offset -
length -
返回:
The number of bytes actually poked

toString

public String toString()
覆盖:
AbstractBuffer 中的 toString


Copyright © 2013. All Rights Reserved.