Click or drag to resize

PooledBitStream Class

[This is preliminary documentation and is subject to change.]

Disposable BitStream that returns the Stream to the BitStreamPool when disposed
Inheritance Hierarchy

Namespace:  MLAPI.Serialization
Assembly:  MLAPI (in MLAPI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public sealed class PooledBitStream : BitStream, 
	IDisposable
Request Example View Source

The PooledBitStream type exposes the following members.

Constructors
  NameDescription
Public methodPooledBitStream
Initializes a new instance of the PooledBitStream class
Top
Properties
  NameDescription
Public propertyBitAligned
Whether or not the current BitPosition is evenly divisible by 8. I.e. whether or not the BitPosition is at a byte boundary.
(Inherited from BitStream.)
Public propertyBitLength
Length of data (in bits) that is considered to be written to the stream.
(Inherited from BitStream.)
Public propertyBitPosition
Bit offset into the buffer that new data will be written to.
(Inherited from BitStream.)
Public propertyCanRead
Whether or not data can be read from the stream.
(Inherited from BitStream.)
Public propertyCanSeek
Whether or not seeking is supported by this stream. (Always true)
(Inherited from BitStream.)
Public propertyCanTimeout (Inherited from Stream.)
Public propertyCanWrite
Whether or not this stream can accept new data. NOTE: this will return true even if only fewer than 8 bits can be written!
(Inherited from BitStream.)
Public propertyCapacity
Current buffer size. The buffer will not be resized (if possible) until Position is equal to Capacity and an attempt to write data is made.
(Inherited from BitStream.)
Public propertyGrowthFactor
Factor by which buffer should grow when necessary.
(Inherited from BitStream.)
Public propertyLength
The current length of data considered to be "written" to the buffer.
(Inherited from BitStream.)
Public propertyPosition
The index that will be written to when any call to write data is made to this stream.
(Inherited from BitStream.)
Public propertyReadTimeout (Inherited from Stream.)
Public propertyResizable
Whether or not the stream will grow the buffer to accomodate more data.
(Inherited from BitStream.)
Public propertyWriteTimeout (Inherited from Stream.)
Top
Methods
  NameDescription
Public methodBeginRead (Inherited from Stream.)
Public methodBeginWrite (Inherited from Stream.)
Public methodClose (Inherited from Stream.)
Public methodCopyFrom(Stream, Int32)
Copy data from another stream
(Inherited from BitStream.)
Public methodCopyFrom(BitStream, Int32, Boolean)
Copys the bits from the provided BitStream
(Inherited from BitStream.)
Public methodCopyUnreadFrom (Inherited from BitStream.)
Public methodCreateObjRef (Inherited from MarshalByRefObject.)
Public methodDispose
Returns the PooledBitStream into the static BitStreamPool
Public methodEndRead (Inherited from Stream.)
Public methodEndWrite (Inherited from Stream.)
Public methodEquals (Inherited from Object.)
Public methodFlush
Flush stream. This does nothing since data is written directly to a byte buffer.
(Inherited from BitStream.)
Public methodStatic memberGet
Gets a PooledBitStream from the static BitStreamPool
Public methodGetBuffer
Get the internal buffer being written to by this stream.
(Inherited from BitStream.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetLifetimeService (Inherited from MarshalByRefObject.)
Public methodGetType (Inherited from Object.)
Public methodInitializeLifetimeService (Inherited from MarshalByRefObject.)
Public methodPeekByte
Peeks a byte without advancing the position
(Inherited from BitStream.)
Public methodRead
Read a subset of the stream buffer and write the contents to the supplied buffer.
(Inherited from BitStream.)
Public methodReadBit
Read a single bit from the stream.
(Inherited from BitStream.)
Public methodReadByte
Read a byte from the buffer. This takes into account possible byte misalignment.
(Inherited from BitStream.)
Public methodSeek
Set position in stream to read from/write to.
(Inherited from BitStream.)
Public methodSetLength
Set length of data considered to be "written" to the stream.
(Inherited from BitStream.)
Public methodToArray
Creates a copy of the internal buffer. This only contains the used bytes
(Inherited from BitStream.)
Public methodToString
Returns hex encoded version of the buffer
(Inherited from BitStream.)
Public methodWrite(Byte)
Write data from the given buffer to the internal stream buffer.
(Inherited from BitStream.)
Public methodWrite(Byte, Int32, Int32)
Write data from the given buffer to the internal stream buffer.
(Inherited from BitStream.)
Public methodWriteBit
Write a single bit to the stream
(Inherited from BitStream.)
Public methodWriteByte (Inherited from Stream.)
Top
See Also