FileStreamContainer class

FileStreamContainer class

Helper for file stream processing.

Inheritance: FileStreamContainerStreamContainerDisposableObject

The FileStreamContainer type exposes the following members:

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.
is_temporalGets or sets a value indicating whether stream is temporal.
is_createdGets a value indicating whether stream was created explicitly.
file_pathGets the file path.

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.
create_file_streamCreates a new file stream.
open_file_streamOpens an existing file stream. If file stream does not exist the appropriate exception is thrown.

See Also