Interface IBytes
The read-only interface for values that are internally represented as binary data.
Namespace: PushTechnology.ClientInterface.Data
Assembly: Diffusion.Client.dll
Syntax
public interface IBytes
Remarks
This interface provides access to copies of the binary data, making instances effectively immutable.
Since: 5.8
Properties
Length
Returns the length of the data in bytes.
Declaration
int Length { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
AsInputStream()
Returns the data as a read-only stream.
Declaration
Stream AsInputStream()
Returns
Type | Description |
---|---|
Stream | The read-only stream. |
CopyTo(Stream)
Writes the data to an output stream.
Declaration
void CopyTo(Stream outputStream)
Parameters
Type | Name | Description |
---|---|---|
Stream | outputStream | The target output stream. |
Remarks
This method avoids the allocation and copying costs of producing an intermediate byte array using ToByteArray().
ToByteArray()
Returns a copy of the data as a byte array.
Declaration
byte[] ToByteArray()
Returns
Type | Description |
---|---|
Byte[] | The copy of the binary data. |