StreamContainer class

StreamContainer class

Represents stream container which contains the stream and provides stream processing routines.

Inheritance: StreamContainerDisposableObject

The StreamContainer type exposes the following members:

Constructors

ConstructorDescription
initInitializes a new instance of the StreamContainer class.
initInitializes a new instance of the StreamContainer class.

Properties

PropertyDescription
disposedGets a value indicating whether this instance is disposed.
sync_rootGets an object that can be used to synchronize access to the synchronized resource.
positionGets or sets the current position within the stream. This value represents offset from the starting stream position passed in the StreamContainer constructor.
streamGets the data stream.
is_stream_disposed_on_closeGets a value indicating whether this stream is disposed on close.
lengthGets or sets the stream length in bytes. This value is less than the Length by the starting stream position passed in the StreamContainer constructor.
can_readGets a value indicating whether stream supports reading.
can_seekGets a value indicating whether stream supports seeking.
can_writeGets a value indicating whether stream supports writing.
READ_WRITE_BYTES_COUNTSpecifies read and write bytes count when reading sequentially.

Methods

MethodDescription
writeWrites all of the specified bytes to the stream.
writeWrites a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
readReads bytes to fill the specified bytes buffer.
readReads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
to_bytesConverts the stream data to the Byte array.
to_bytesConverts the stream data to the Byte array.
saveSaves (copies) the stream’s data to the specified stream. Uses default buffer size StreamContainer.ReadWriteBytesCount and stream StreamContainer.length value.
saveSaves (copies) all the stream’s data to the specified stream. Uses stream StreamContainer.length value.
saveSaves (copies) the stream’s data to the specified stream.
saveSaves (copies) the stream’s data to the specified stream. Uses default buffer size StreamContainer.ReadWriteBytesCount and stream StreamContainer.length value.
saveSaves (copies) the stream’s data to the specified stream. Uses stream StreamContainer.length value.
saveSaves (copies) the stream’s data to the specified stream.
write_toCopies the contained data to another StreamContainer.
write_toCopies the contained data to another StreamContainer.
flushClears all buffers for this stream and causes any buffered data to be written to the underlying device.
write_byteWrites a byte to the current position in the stream and advances the position within the stream by one byte.
read_byteReads 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.
seekSets the position within the current stream.
seek_beginSets the stream position to the beginning of the stream. This value represents offset from the starting stream position passed in the StreamContainer constructor.

See Also