Свойство | Тип | Описание | |
---|---|---|---|
Buffer | System | ||
CheckBounds | void | ||
CheckIndex | int | ||
CheckIndex | int | ||
DiscardMark | void | ||
NextGetIndex | int | ||
NextGetIndex | int | ||
NextPutIndex | int | ||
NextPutIndex | int | ||
Truncate | void |
Метод | Описание | |
---|---|---|
Clear ( ) : Buffer |
Clears this buffer. The position is set to zero, the limit is set to the capacity, and the mark is discarded. Invoke this method before using a sequence of channel-read or This method does not actually erase the data in the buffer, but it is named as if it did because it will most often be used in situations in which that might as well be the case.
|
|
Flip ( ) : Buffer |
Flips this buffer. The limit is set to the current position and then the position is set to zero. If the mark is defined then it is discarded. After a sequence of channel-read or This method is often used in conjunction with the ByteBuffer.Compact() method when transferring data from one place to another.
|
|
Mark ( ) : Buffer |
Sets this buffer's mark at its position.
|
|
Reset ( ) : Buffer |
Resets this buffer's position to the previously-marked position. Invoking this method neither changes nor discards the mark's value.
|
|
Rewind ( ) : Buffer |
Rewinds this buffer. The position is set to zero and the mark is discarded. Invoke this method before a sequence of channel-write or
|
|
SetLimit ( int newLimit ) : Buffer |
Sets this buffer's limit. If the position is larger than the new limit then it is set to the new limit. If the mark is defined and larger than the new limit then it is discarded.
|
|
SetPosition ( int newPosition ) : Buffer |
Sets this buffer's position. If the mark is defined and larger than the new position then it is discarded.
|
Метод | Описание | |
---|---|---|
Buffer ( int mark, int pos, int lim, int cap ) : System |
Creates a new buffer with the given mark, position, limit, and capacity, after checking invariants.
|
|
CheckBounds ( int off, int len, int size ) : void | ||
CheckIndex ( int i ) : int |
Checks the given index against the limit, throwing an IndexOutOfRangeException if it is not smaller than the limit or is smaller than zero.
|
|
CheckIndex ( int i, int nb ) : int | ||
DiscardMark ( ) : void | ||
NextGetIndex ( ) : int |
Checks the current position against the limit, throwing a BufferUnderflowException if it is not smaller than the limit, and then increments the position.
|
|
NextGetIndex ( int nb ) : int | ||
NextPutIndex ( ) : int |
Checks the current position against the limit, throwing a BufferOverflowException if it is not smaller than the limit, and then increments the position.
|
|
NextPutIndex ( int nb ) : int | ||
Truncate ( ) : void |
public SetLimit ( int newLimit ) : Buffer | ||
newLimit | int | The new limit value; must be non-negative and no larger than this buffer's capacity |
Результат | Buffer |
public SetPosition ( int newPosition ) : Buffer | ||
newPosition | int | The new position value; must be non-negative and no larger than the current limit |
Результат | Buffer |