Class ByteInputStream
An buffer of bytes that can be read sequentially.
Inheritance
System.Object
ByteInputStream
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class ByteInputStream
Constructors
ByteInputStream(Byte[])
Initializes a new instance of the Byte
Declaration
public ByteInputStream(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System. |
bytes | The bytes. |
ByteInputStream(Byte[], Int32)
Initializes a new instance of the Byte
Declaration
public ByteInputStream(byte[] bytes, int offset)
Parameters
Type | Name | Description |
---|---|---|
System. |
bytes | The bytes. |
System. |
offset | The offset. |
Properties
Available
Gets the number of available bytes for reading.
Declaration
public int Available { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
Mark()
Marks the current position for a later reset.
Declaration
public void Mark()
Read()
Reads a value from the byte array.
Declaration
public int Read()
Returns
Type | Description |
---|---|
System. |
The byte, or -1 if no more bytes are available for reading. |
Read(Byte[], Int32, Int32)
Reads a segment from the byte array.
Declaration
public int Read(byte[] buffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System. |
buffer | |
System. |
offset | |
System. |
length |
Returns
Type | Description |
---|---|
System. |
The number of bytes read. |
Reset()
Resets the stream to the marked position.
Declaration
public void Reset()
Skip(Int32)
Advances the stream position by the amount specified.
Declaration
public int Skip(int n)
Parameters
Type | Name | Description |
---|---|---|
System. |
n | The number of bytes to skip. |
Returns
Type | Description |
---|---|
System. |
The number of bytes skipped. |