StreamTools ThreadSafeStream MethodsNetworkComms.Net Help
The StreamTools ThreadSafeStream type exposes the following members.
Methods

  NameDescription
Public methodOnlineBeginRead
Begins an asynchronous read operation.
(Inherited from OnlineStream.)
Public methodOnlineBeginWrite
Begins an asynchronous write operation.
(Inherited from OnlineStream.)
Public methodOnlineClose
Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
(Inherited from OnlineStream.)
Public methodOnlineCopyTo(Stream)
Reads the bytes from the current stream and writes them to the destination stream.
(Inherited from OnlineStream.)
Public methodOnlineCopyTo(Stream, Int32)
Reads all the bytes from the current stream and writes them to a destination stream, using a specified buffer size.
(Inherited from OnlineStream.)
Public methodCopyTo(Stream, Int64, Int64, Int32, Double, Int32)
Copies data specified by start and length properties from internal stream to the provided stream.
Public methodOnlineCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from OnlineMarshalByRefObject.)
Protected methodOnlineCreateWaitHandleObsolete.
Allocates a OnlineWaitHandle object.
(Inherited from OnlineStream.)
Public methodDispose 
Disposes the internal stream if DiposeInnerStreamOnDispose is true. Use Close() to close the inner stream regardless of DiposeInnerStreamOnDispose.
Public methodDispose(Boolean)
Disposes the internal stream. If DiposeInnerStreamOnDispose is false, forceDispose must be true to dispose of the internal stream.
Public methodOnlineEndRead
Waits for the pending asynchronous read to complete.
(Inherited from OnlineStream.)
Public methodOnlineEndWrite
Ends an asynchronous write operation.
(Inherited from OnlineStream.)
Public methodOnlineEquals
Determines whether the specified OnlineObject is equal to the current OnlineObject.
(Inherited from OnlineObject.)
Protected methodOnlineFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from OnlineObject.)
Public methodFlush
When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.
(Overrides OnlineStream Flush .)
Public methodGetBuffer
Attempts to return the buffer associated with the internal stream. In certain circumstances this is more efficient than copying the stream contents into a new buffer using ToArray. If the internal stream is not a memory stream will throw InvalidCastException. If access to the buffer is not allowed will throw an UnauthorizedAccessException.
Public methodOnlineGetHashCode
Serves as a hash function for a particular type.
(Inherited from OnlineObject.)
Public methodOnlineGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from OnlineMarshalByRefObject.)
Public methodOnlineGetType
Gets the OnlineType of the current instance.
(Inherited from OnlineObject.)
Public methodOnlineInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from OnlineMarshalByRefObject.)
Public methodMD5 
Public methodMD5(Int64, Int32)
Protected methodOnlineMemberwiseClone 
Creates a shallow copy of the current OnlineObject.
(Inherited from OnlineObject.)
Protected methodOnlineMemberwiseClone(Boolean)
Creates a shallow copy of the current OnlineMarshalByRefObject object.
(Inherited from OnlineMarshalByRefObject.)
Protected methodOnlineObjectInvariant
Provides support for a Contract.
(Inherited from OnlineStream.)
Public methodRead
When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
(Overrides OnlineStream Read( Byte , Int32, Int32).)
Public methodOnlineReadByte
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.
(Inherited from OnlineStream.)
Public methodSeek
When overridden in a derived class, sets the position within the current stream.
(Overrides OnlineStream Seek(Int64, SeekOrigin).)
Public methodSetLength
When overridden in a derived class, sets the length of the current stream.
(Overrides OnlineStream SetLength(Int64).)
Public methodToArray(Int32)
Returns data from entire Stream
Public methodToArray(Int64, Int64, Int32, Int32)
Returns data from the specified portion of Stream
Public methodOnlineToString
Returns a string that represents the current object.
(Inherited from OnlineObject.)
Public methodWrite( Byte , Int64)
Writes the provided buffer to the internal stream starting at the provided position within the internal stream
Public methodWrite( Byte , Int32, Int32)
When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
(Overrides OnlineStream Write( Byte , Int32, Int32).)
Public methodOnlineWriteByte
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
(Inherited from OnlineStream.)
Back to Top
See Also