Block<THeader> Constructors
Overloads
| Name | Description |
|---|---|
Block(Header, Int32) | Initializes a new instance of the Block<THeader> class with zero-filled data of the specified length. |
Block(Header, Int32, Stream) | Initializes a new instance of the Block<THeader> class by reading data from a stream. |
Block(Header, Int32, IEnumerable<Byte>) | Initializes a new instance of the Block<THeader> class from a sequence of bytes. |
Block(Header, Byte[]) | Initializes a new instance of the Block<THeader> class from a byte array. |
Block(Header, Int32)
Initializes a new instance of the Block<THeader> class with zero-filled data of the specified length.
c#
protected Block(Header header, int length);Parameters
| Name | Type | Description |
|---|---|---|
header | Header | The header for this block. |
length | Int32 | The length of the block data in bytes. |
Block(Header, Int32, Stream)
Initializes a new instance of the Block<THeader> class by reading data from a stream.
c#
protected Block(Header header, int length, Stream data);Parameters
| Name | Type | Description |
|---|---|---|
header | Header | The header for this block. |
length | Int32 | The number of bytes to read. |
data | Stream | The stream to read the block data from. |
Block(Header, Int32, IEnumerable<Byte>)
Initializes a new instance of the Block<THeader> class from a sequence of bytes.
c#
protected Block(Header header, int length, IEnumerable<Byte> data);Parameters
| Name | Type | Description |
|---|---|---|
header | Header | The header for this block. |
length | Int32 | The expected length of the block data in bytes. |
data | IEnumerable<Byte> | The bytes for this block. |
Block(Header, Byte[])
Initializes a new instance of the Block<THeader> class from a byte array.
c#
protected Block(Header header, Byte[] data);Parameters
| Name | Type | Description |
|---|---|---|
header | Header | The header for this block. |
data | Byte[] | The raw byte data for this block. |