StreamContainer Class

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

Namespace:  Aspose.CAD
Assembly:  Aspose.CAD (in Aspose.CAD.dll) Version: 20.9
Syntax
public class StreamContainer : DisposableObject

The StreamContainer type exposes the following members.

Constructors
  NameDescription
Public methodStreamContainer(Stream)
Initializes a new instance of the StreamContainer class.
Public methodStreamContainer(Stream, Boolean)
Initializes a new instance of the StreamContainer class.
Properties
  NameDescription
Public propertyCanRead
Gets a value indicating whether stream supports reading.
Public propertyCanSeek
Gets a value indicating whether stream supports seeking.
Public propertyCanWrite
Gets a value indicating whether stream supports writing.
Public propertyDisposed
Gets a value indicating whether this instance is disposed.
(Inherited from DisposableObject.)
Public propertyIsStreamDisposedOnClose
Gets a value indicating whether this stream is disposed on close.
Public propertyLength
Gets or sets the stream length in bytes. This value is less than the Length by the starting stream position passed in the StreamContainer constructor.
Public propertyPosition
Gets or sets the current position within the stream. This value represents offset from the starting stream position passed in the StreamContainer constructor.
Public propertyStream
Gets the data stream.
Public propertySyncRoot
Gets an object that can be used to synchronize access to the synchronized resource.
Methods
  NameDescription
Protected methodAfterStreamDisposed
Called after the stream is disposed.
Protected methodBeforeSave
Called before save occurs on the destination stream.
Protected methodBeforeStreamDisposed
Called before the stream is disposed.
Public methodDispose
Disposes the current instance.
(Inherited from DisposableObject.)
Protected methodDisposeStream
Disposes the stream.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Finalizes an instance of the DisposableObject class.
(Inherited from DisposableObject.)
Public methodFlush
Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRead(Byte)
Reads bytes to fill the specified bytes buffer.
Public methodRead(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.
Public methodReadByte
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.
Protected methodReleaseManagedResources
Releases the managed resources. Make sure no unmanaged resources are released here, since they may have been already released.
(Overrides DisposableObjectReleaseManagedResources.)
Protected methodReleaseUnmanagedResources
Releases the unmanaged resources. Make sure no managed resources are released here, since they may have been already released.
(Inherited from DisposableObject.)
Public methodSave(Stream)
Saves (copies) the stream's data to the specified stream. Uses default buffer size ReadWriteBytesCount and stream Length value.
Public methodSave(String)
Saves (copies) the stream's data to the specified stream. Uses default buffer size ReadWriteBytesCount and stream Length value.
Public methodSave(Stream, Int32)
Saves (copies) all the stream's data to the specified stream. Uses stream Length value.
Public methodSave(String, Int32)
Saves (copies) the stream's data to the specified stream. Uses stream Length value.
Public methodSave(Stream, Int32, Int64)
Saves (copies) the stream's data to the specified stream.
Public methodSave(String, Int32, Int64)
Saves (copies) the stream's data to the specified stream.
Public methodSeek
Sets the position within the current stream.
Public methodSeekBegin
Sets the stream position to the beginning of the stream. This value represents offset from the starting stream position passed in the StreamContainer constructor.
Public methodToBytes
Converts the stream data to the Byte array.
Public methodToBytes(Int64, Int64)
Converts the stream data to the Byte array.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodVerifyNotDisposed
Verifies that the current instance is not disposed.
(Inherited from DisposableObject.)
Public methodWrite(Byte)
Writes all of the specified bytes to the stream.
Public methodWrite(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.
Public methodWriteByte
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
Public methodWriteTo(StreamContainer)
Copies the contained data to another StreamContainer.
Public methodWriteTo(StreamContainer, Int64)
Copies the contained data to another StreamContainer.
Operators
Fields
  NameDescription
Public fieldStatic memberReadWriteBytesCount
Specifies read and write bytes count when reading sequentially.
Protected fieldStartPosition
The starting position inside the stream.
See Also