Property | Type | Description | |
---|---|---|---|
EnsureCapacity | void | ||
ReadInner | int | ||
WriteInner | void | ||
ZeroSpareCapacity | void |
Method | Description | |
---|---|---|
Flush ( ) : void |
Overrides Stream.Flush so that no action is performed.
|
|
MemoryBlockStream ( ) : System |
Construct with the default block size.
|
|
MemoryBlockStream ( int blockSize ) : System |
Construct with the specified block size.
|
|
Read ( byte buffer, int offset, int count ) : int |
Reads a block of bytes from the stream and writes the data to a buffer.
|
|
ReadByte ( ) : int |
Reads a byte from the stream.
|
|
Seek ( long offset, SeekOrigin origin ) : long |
Sets the position within the stream to the specified value.
|
|
SetLength ( long value ) : void |
Sets the length of the stream to the specified value.
|
|
ToArray ( ) : byte[] |
Writes the stream contents to a byte array, regardless of the Position property.
|
|
Trim ( ) : void |
Remove excess blocks from the block list.
|
|
Write ( byte buffer, int offset, int count ) : void |
Writes a block of bytes into the stream.
|
|
WriteByte ( byte value ) : void |
Writes a byte to the stream at the current position.
|
Method | Description | |
---|---|---|
EnsureCapacity ( int value ) : void | ||
ReadInner ( byte buff, int offset, int count, int blockIdx, int blockOffset ) : int |
Read bytes from the memory stream into the provided buffer, starting at the specified block index and intra-block offset..
|
|
WriteInner ( byte buff, int offset, int count, int blockIdx, int blockOffset ) : void |
Write bytes into the memory stream, starting at the specified block index and intra-block offset.
|
|
ZeroSpareCapacity ( ) : void |
Ensure that any existing capacity after _length is zeroed.
|
public MemoryBlockStream ( int blockSize ) : System | ||
blockSize | int | The block size to use. |
return | System |
public Read ( byte buffer, int offset, int count ) : int | ||
buffer | byte | The byte array to read bytes into. |
offset | int | The zero-based byte offset in buffer at which to begin storing data from the current stream. |
count | int | The maximum number of bytes to read. |
return | int |
public Seek ( long offset, SeekOrigin origin ) : long | ||
offset | long | The new position within the stream. This is relative to the loc parameter, and can be positive or negative. |
origin | SeekOrigin | A value of type SeekOrigin, which acts as the seek reference point. |
return | long |
public Write ( byte buffer, int offset, int count ) : void | ||
buffer | byte | The byte data to write into the stream |
offset | int | The zero-based byte offset in buffer from which to begin copying bytes to the current stream. |
count | int | The maximum number of bytes to write. |
return | void |
public WriteByte ( byte value ) : void | ||
value | byte | The byte to write. |
return | void |