The comparison between inline buffering versus System.IO.BufferedStream versus unbuffered output, and System.IO.BufferedStream shows no improvement whatsoever over unbuffered output, whereas hand-implemented buffered output with the same buffer size settings show drastic improvement. Hence this class.


The following tables list the members exposed by ActualBufferedStream.

Public Constructors

  Name Description
Static Public method ActualBufferedStream Overloaded.  
Top

Public Fields

  Name Description
Public field Static DEFAULT_BUFFER_SIZE  
Top

Protected Fields

  Name Description
Family field _bufferSize  
Family field _readBuf  
Family field _readBufEnd  
Family field _readBufStart  
Family field _readEOS  
Family field _readTemp  
Family field _s   (inherited from AdapterStream)
Family field _writeBuf  
Family field _writeBufPos  
Family field _writeTemp  
Top

Public Properties

  Name Description
Public property BufferSize  
Public property CanRead   (inherited from AdapterStream)
Public property CanSeek   (inherited from AdapterStream)
Public property CanTimeout Gets a value that determines whether the current stream can time out. (inherited from Stream)
Public property CanWrite   (inherited from AdapterStream)
Public property Length   (inherited from AdapterStream)
Public property Position   (inherited from AdapterStream)
Public property ReadTimeout Gets or sets a value that determines how long the stream will attempt to read before timing out. (inherited from Stream)
Public property TargetStream   (inherited from AdapterStream)
Public property WriteTimeout Gets or sets a value that determines how long the stream will attempt to write before timing out. (inherited from Stream)
Top

Public Methods

  Name Description
Public method BeginRead   (inherited from AdapterStream)
Public method BeginWrite   (inherited from AdapterStream)
Public method Close   (inherited from AdapterStream)
Public method CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method Dispose Overloaded. Releases all resources used by the Stream object. (inherited from Stream)
Public method EndRead   (inherited from AdapterStream)
Public method EndWrite   (inherited from AdapterStream)
Public method Equals Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method Flush Overridden.  
Public method GetHashCode Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method GetType Gets the Type of the current instance. (inherited from Object)
Public method InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method Read Overridden.  
Public method ReadByte Overridden.  
Public method Seek Overridden.  
Public method SetLength   (inherited from AdapterStream)
Public method ToString Returns a String that represents the current Object. (inherited from Object)
Public method Write Overridden.  
Public method WriteByte Overridden.  
Top

Protected Methods

  Name Description
Family method CreateWaitHandle Allocates a WaitHandle object. (inherited from Stream)
Family method Dispose Overloaded. Releases all resources used by the Stream object. (inherited from Stream)
Family method Finalize Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Family method MemberwiseClone Overloaded. Creates a shallow copy of the current Object. (inherited from MarshalByRefObject)
Family method ResetReadBuffer  
Top

Explicit Interface Implementations

  Name Description
Static Private method ActualBufferedStream Overloaded.  
Top

See Also