Stream

Stream


Provides a set of standard methods for using a Stream object.


Public:

Types:

NameDescription
 SeekOrigin The reference point in which to begin seeking from.  

Properties:

NameDescription
 CanRead (get) Returns if the stream supports reading.  
 CanSeek (get) Returns if the stream supports seeking.  
 CanTimeout (get) Returns if the Stream object can timeout during a read or write operation.  
 CanWrite (get) Returns if the stream supports being written to.  
 Length (get) Returns the length of the stream in bytes.  
 Position (get) Returns the current position within the stream.  
 Position (let) Sets the position in the stream where the next read or write will take place.  
 ReadTimeout (get) Returns the duration allowed before a timeout will occur.  
 ReadTimeout (let) Sets the duration allowed before a timeout will occur.  
 WriteTimeout (get) Returns the duration allowed before a timeout will occur.  
 WriteTimeout (let) Sets the duration allowed before a timeout will occur.  

Methods:

NameDescription
 BeginRead Begins an Asynchronous reading process.  
 BeginWrite Begins an Asynchronous writing process.  
 CloseStream Closes the current stream. 
 CopyTo Reads the bytes from the current stream and writes them to another stream.  
 EndRead Ends an asynchronous read operation returning the total number of bytes read.  
 EndWrite Used to end an asynchronous write operation.  
 Equals Determines if this instance is equal to the value.  
 Flush Flushes any buffers in the object to the underlying stream. 
 GetHashCode Returns a semi-unique number representing this instance. 
 ReadBlock Reads a block of bytes from the stream.  
 ReadByte Reads a single byte from the stream.  
 SeekPosition Moves the current stream pointer to a new position.  
 SetLength Sets the length of the current stream.  
 ToString Returns a string representation of the this instance.  
 WriteBlock Writes an array of bytes to the stream.  
 WriteByte Writes a single byte to the stream.  

Remarks

This interface should be implements on classes that wish to be used as a Stream type object.

See Also

Project CorLib Overview

Class Stream Overview

StreamStatic

FileStream

MemoryStream

CryptoStream