InputStreamAggregator class | QSYS API Reference Guide
Estimated reading time: 5 minutes
Queue multiple, fixed-length, read-only streams into one stream.
Namespace: ASNA.DataGate.Common.Util Assembly: ASNA.QSys.DataGate.Client.dll
Inheritance: Object –> MarshalByRefObject –> Stream
Constructors
Name | Description |
---|---|
InputStreamAggregator() | Initializes a new instance of the class. |
InputStreamAggregator()
Initializes a new instance of the class.
InputStreamAggregator()
Properties
Type | Name | Description |
---|---|---|
Boolean | CanRead | Gets a value indicating whether the current stream supports reading. |
Boolean | CanSeek | Gets a value indicating whether the current stream supports seeking. |
Boolean | CanWrite | Gets a value indicating whether the current stream supports writing. |
Int64 | Length | Gets the length in bytes of the stream. |
Int64 | Position | Gets or sets the position within the current stream. |
Methods
Signature | Description |
---|---|
Append(Int32, Func<Stream>) | Appends a new stream to the list of streams to be aggregated. |
Dispose(Boolean) | Releases all resources used by the current instance of the class. |
Finalize() | Finalizes an instance of the class. |
Flush() | Overrides the Stream.Flush method so that no action is performed. |
Read(Byte[], Int32, Int32) | Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. |
ReadByte() | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. |
Seek(Int64, SeekOrigin) | Sets the position within the current stream. Always throws a NotSupportedException. |
SetLength(Int64) | Sets the length of the current stream. This method always throws a NotSupportedException. |
Write(Byte[], Int32, Int32) | Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. This method always throws a NotSupportedException. |
void Append(int len, Func<Stream> cons)
Appends a new stream to the list of streams to be aggregated.
void Append(int len, Func<Stream> cons)
Parameters
Type | Parameter name | Description |
---|---|---|
Int32 | len | The length of the stream to be appended. |
Func<Stream> | cons | A function that constructs the stream to be appended. |
void Dispose(bool disposing)
Releases all resources used by the current instance of the class.
void Dispose(bool disposing)
Parameters
Type | Parameter name | Description |
---|---|---|
Boolean |
void Finalize()
Finalizes an instance of the class.
void Finalize()
void Flush()
Overrides the Stream.Flush method so that no action is performed.
void Flush()
int Read(Byte[] buffer, int offset, int count)
Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
int Read(Byte[] buffer, int offset, int count)
Parameters
Type | Parameter name | Description |
---|---|---|
Byte[] | buffer | An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source. |
Int32 | offset | The zero-based byte offset in buffer at which to begin storing the data read from the current stream. |
Int32 | count | The maximum number of bytes to be read from the current stream. |
Returns
Type | Description |
---|---|
Int32 | The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. |
int ReadByte()
Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
int ReadByte()
long Seek(long offset, SeekOrigin origin)
Sets the position within the current stream. Always throws a NotSupportedException.
long Seek(long offset, SeekOrigin origin)
Parameters
Type | Parameter name | Description |
---|---|---|
Int64 | offset | A byte offset relative to the origin parameter. |
SeekOrigin | origin | A value of type SeekOrigin indicating the reference point used to obtain the new position. |
Returns
Type | Description |
---|---|
Int64 | Always throws a NotSupportedException. |
void SetLength(long value)
Sets the length of the current stream. This method always throws a NotSupportedException.
void SetLength(long value)
Parameters
Type | Parameter name | Description |
---|---|---|
Int64 | value | The desired length of the current stream in bytes. |
void Write(Byte[] buffer, int offset, int count)
Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. This method always throws a NotSupportedException.
void Write(Byte[] buffer, int offset, int count)
Parameters
Type | Parameter name | Description |
---|---|---|
Byte[] | buffer | An array of bytes. This method copies count bytes from buffer to the current stream. |
Int32 | offset | The zero-based byte offset in buffer at which to begin copying bytes to the current stream. |
Int32 | count | The number of bytes to be written to the current stream. |