메소드 | 설명 | |
---|---|---|
AppendFill ( byte buffer, int offset, int count ) : int |
Takes bytes starting from an offset in an array segment and appends as many as possible to the buffer. This method will append a maximum of count elements to the end of the buffer, starting at offset in buffer. If there is not enough space for count elements, it will fill the remaining space with bytes from the start of buffer. |
|
BoundedBuffer ( ) : System |
Initializes a new instance of the class with no capacity. A BoundedBuffer with no capacity is unusable. Any consumer of this class must call Reset(int) to assign a capacity before they can use it. |
|
BoundedBuffer ( int capacity ) : System |
Initializes a new instance of the BoundedBuffer class with a maximum capacity.
|
|
Dispose ( ) : void | ||
ExtractAndReset ( int newCapacity ) : byte[] |
Extracts the data from the BoundedBuffer and prepares it for the new data.
|
|
Reset ( int newCapacity ) : void |
Prepares the buffer for new data.
|
메소드 | 설명 | |
---|---|---|
AppendInternal ( byte buffer, int offset, int requested ) : int | ||
Dispose ( bool disposing ) : void |
Virtual dispose method. When overriding, call the base implementation before your logic.
|
|
GetCapacityIsNonPositiveException ( int capacity ) : |
||
GetCountIsNonPositiveException ( int count ) : |
||
GetNewCapacityIsNegativeException ( int newCapacity ) : |
||
GetOffsetIsNegativeException ( int offset ) : |
||
ResetInternal ( int newCapacity ) : void | ||
ThrowIfDisposed ( ) : void |
Throws a new ObjectDisposedException if the current object is disposed.
|
public AppendFill ( byte buffer, int offset, int count ) : int | ||
buffer | byte | The array to read from. |
offset | int | The start of the segment. |
count | int | The number of bytes to append. |
리턴 | int |
public BoundedBuffer ( int capacity ) : System | ||
capacity | int | The maximum capacity to assign. |
리턴 | System |
public ExtractAndReset ( int newCapacity ) : byte[] | ||
newCapacity | int | The new capacity for the |
리턴 | byte[] |
public Reset ( int newCapacity ) : void | ||
newCapacity | int | The new capacity for the buffer. |
리턴 | void |