Method | Description | |
---|---|---|
BlockAllocatedMemoryStream ( ) : System |
Initializes a new instance of BlockAllocatedMemoryStream.
|
|
BlockAllocatedMemoryStream ( byte buffer ) : System |
Initializes a new instance of BlockAllocatedMemoryStream from specified buffer. Unlike MemoryStream, the BlockAllocatedMemoryStream will not use the provided buffer as its backing buffer. The buffer will be copied into internally managed reusable memory buffers. Subsequently, the notion of a non-expandable stream is not supported. |
|
BlockAllocatedMemoryStream ( byte buffer, int startIndex, int length ) : System |
Initializes a new instance of BlockAllocatedMemoryStream from specified region of buffer. Unlike MemoryStream, the BlockAllocatedMemoryStream will not use the provided buffer as its backing buffer. The buffer will be copied into internally managed reusable memory buffers. Subsequently, the notion of a non-expandable stream is not supported. |
|
BlockAllocatedMemoryStream ( int capacity ) : System |
Initializes a new instance of BlockAllocatedMemoryStream for specified capacity.
|
|
Clear ( ) : void |
Clears the entire BlockAllocatedMemoryStream contents and releases any allocated memory blocks.
|
|
Flush ( ) : void |
Overrides the Stream.Flush method so that no action is performed. This method overrides the Stream.Flush method. Because any data written to a BlockAllocatedMemoryStream object is written into RAM, this method is superfluous. |
|
Read ( byte buffer, int startIndex, int length ) : int |
Reads a block of bytes from the current stream and writes the data to buffer.
|
|
ReadByte ( ) : int |
Reads a byte from the current stream.
|
|
ReadFrom ( Stream source, long length ) : void |
Reads specified number of bytes from source stream into this BlockAllocatedMemoryStream starting at the current position.
|
|
Seek ( long offset, SeekOrigin origin ) : long |
Sets the Position within the current stream to the specified value relative the origin.
|
|
SetLength ( long value ) : void |
Sets the length of the current stream to the specified value. If this length is larger than the previous length, the data is initialized to 0's between the previous length and the current length. |
|
ToArray ( ) : byte[] |
Writes the stream contents to a byte array, regardless of the Position property. This may fail if there is not enough contiguous memory available to hold current size of stream. When possible use methods which operate on streams directly instead. |
|
Write ( byte buffer, int startIndex, int length ) : void |
Writes a block of bytes to the current stream using data read from buffer.
|
|
WriteByte ( byte value ) : void |
Writes a byte to the current stream at the current position.
|
|
WriteTo ( Stream destination ) : void |
Writes the entire stream into destination, regardless of Position, which remains unchanged.
|
Method | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Releases the unmanaged resources used by the BlockAllocatedMemoryStream object and optionally releases the managed resources.
|
Method | Description | |
---|---|---|
EnsureCapacity ( long length ) : void |
Makes sure desired length can be accommodated by future data accesses.
|
|
InitializeToPosition ( long position ) : void |
Initializes all of the bytes to zero.
|
public BlockAllocatedMemoryStream ( ) : System | ||
return | System |
public BlockAllocatedMemoryStream ( byte buffer ) : System | ||
buffer | byte | Initial buffer to copy into stream. |
return | System |
public BlockAllocatedMemoryStream ( byte buffer, int startIndex, int length ) : System | ||
buffer | byte | Initial buffer to copy into stream. |
startIndex | int | 0-based start index into the |
length | int | Valid number of bytes within |
return | System |
public BlockAllocatedMemoryStream ( int capacity ) : System | ||
capacity | int | Initial length of the stream. |
return | System |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | |
return | void |
public Read ( byte buffer, int startIndex, int length ) : int | ||
buffer | byte | When this method returns, contains the specified byte array with the values between |
startIndex | int | The byte offset in |
length | int | The maximum number of bytes to read. |
return | int |
public ReadFrom ( Stream source, long length ) : void | ||
source | Stream | The stream containing the data to copy |
length | long | The number of bytes to copy |
return | void |
public Seek ( long offset, SeekOrigin origin ) : long | ||
offset | long | The new position within the stream. This is relative to the |
origin | SeekOrigin | A value of type |
return | long |
public SetLength ( long value ) : void | ||
value | long | The value at which to set the length. |
return | void |
public Write ( byte buffer, int startIndex, int length ) : void | ||
buffer | byte | The buffer to write data from. |
startIndex | int | The byte offset in |
length | int | The maximum number of bytes to write. |
return | void |
public WriteByte ( byte value ) : void | ||
value | byte | The byte to write. |
return | void |
public WriteTo ( Stream destination ) : void | ||
destination | Stream | The stream onto which to write the current contents. |
return | void |