Property | Type | Description | |
---|---|---|---|
CheckDisposed | void | ||
EnsureCapacity | void | ||
GetBlockAndRelativeOffset | BlockAndOffset | ||
InternalRead | int | ||
RecyclableMemoryStream | System | ||
ReleaseLargeBuffer | void | ||
ToArray | byte[] |
Method | Description | |
---|---|---|
Close ( ) : void |
Equivalent to Dispose
|
|
GetBuffer ( ) : byte[] |
Returns a single buffer containing the contents of the stream. The buffer may be longer than the stream length. IMPORTANT: Doing a Write() after calling GetBuffer() invalidates the buffer. The old buffer is held onto until Dispose is called, but the next time GetBuffer() is called, a new buffer from the pool will be required. |
|
Read ( byte buffer, int offset, int count ) : int |
Reads from the current position into the provided buffer
|
|
ReadByte ( ) : int |
Reads a single byte from the current position in the stream.
|
|
RecyclableMemoryStream ( |
Allocate a new RecyclableMemoryStream object.
|
|
RecyclableMemoryStream ( |
Allocate a new RecyclableMemoryStream object
|
|
RecyclableMemoryStream ( |
Allocate a new RecyclableMemoryStream object
|
|
Seek ( long offset, SeekOrigin loc ) : long |
Sets the position to the offset from the seek location
|
|
SetLength ( long value ) : void |
Sets the length of the stream
|
|
ToString ( ) : string |
Returns a useful string for debugging. This should not normally be called in actual production code.
|
|
Write ( byte buffer, int offset, int count ) : void |
Writes the buffer to the stream
|
|
WriteByte ( byte value ) : void |
Writes a single byte to the current position in the stream.
|
|
WriteTo ( Stream stream ) : void |
Synchronously writes this stream's bytes to the parameter stream. Important: This does a synchronous write, which may not be desired in some situations |
Method | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Returns the memory used by this stream back to the pool. This method is not thread safe and it may not be called more than once. |
Method | Description | |
---|---|---|
CheckDisposed ( ) : void | ||
EnsureCapacity ( int newCapacity ) : void | ||
GetBlockAndRelativeOffset ( int offset ) : BlockAndOffset | ||
InternalRead ( byte buffer, int offset, int count, int fromPosition ) : int | ||
RecyclableMemoryStream ( |
Allocate a new RecyclableMemoryStream object
|
|
ReleaseLargeBuffer ( ) : void |
Release the large buffer (either stores it for eventual release or returns it immediately).
|
|
ToArray ( ) : byte[] |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | Whether we're disposing (true), or being called by the finalizer (false) |
return | void |
public Read ( byte buffer, int offset, int count ) : int | ||
buffer | byte | Destination buffer |
offset | int | Offset into buffer at which to start placing the read bytes. |
count | int | Number of bytes to read. |
return | int |
public RecyclableMemoryStream ( |
||
memoryManager | The memory manager | |
return | System |
public RecyclableMemoryStream ( |
||
memoryManager | The memory manager | |
tag | string | A string identifying this stream for logging and debugging purposes |
return | System |
public RecyclableMemoryStream ( |
||
memoryManager | The memory manager | |
tag | string | A string identifying this stream for logging and debugging purposes |
requestedSize | int | The initial requested size to prevent future allocations |
return | System |
public Seek ( long offset, SeekOrigin loc ) : long | ||
offset | long | How many bytes to move |
loc | SeekOrigin | From where |
return | long |
public Write ( byte buffer, int offset, int count ) : void | ||
buffer | byte | Source buffer |
offset | int | Start position |
count | int | Number of bytes to write |
return | void |
public WriteByte ( byte value ) : void | ||
value | byte | byte value to write |
return | void |
public WriteTo ( Stream stream ) : void | ||
stream | Stream | Destination stream |
return | void |