BinaryStreamBase Class

An abstract class for reading/writing to a little-endian stream.

Definition

Namespace: SnapDB.IO
Assembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public abstract class BinaryStreamBase : IDisposable
Inheritance
Object    BinaryStreamBase
Derived
Implements
IDisposable

Constructors

BinaryStreamBase Creates a BinaryStreamBase

Properties

CanRead When overridden in a derived class, gets a value indicating whether the current stream supports reading.
CanSeek When overridden in a derived class, gets a value indicating whether the current stream supports seeking.
CanWrite When overridden in a derived class, gets a value indicating whether the current stream supports writing.
Length When overridden in a derived class, gets the length in bytes of the stream.
Position When overridden in a derived class, gets or sets the position within the current stream.

Methods

Copy Copies a block of data from the current stream to another position within the same stream.
Dispose Releases all the resources used by the BinaryStreamBase object.
Dispose(Boolean) Releases the unmanaged resources used by the BinaryStreamBase object and optionally releases the managed resources.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Flush When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
InsertBytes Inserts a certain number of bytes into the stream, shifting valid data to the right. The stream's position remains unchanged. (i.e., pointing to the beginning of the newly inserted bytes).
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Read 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.
Read7BitUInt32 Reads from the underlying stream in little-endian format. Advancing the position.
Read7BitUInt64 Reads from the underlying stream in little-endian format. Advancing the position.
ReadAll(Byte*, Int32) Reads from the underlying stream in little-endian format. Advancing the position.
ReadAll(Byte, Int32, Int32) Reads all of the provided bytes. Will not return prematurely, but continue to execute a Read(Byte, Int32, Int32) command until the entire length has been read.
ReadBoolean Reads from the underlying stream in little-endian format. Advancing the position.
ReadBytes Reads from the underlying stream in little-endian format. Advancing the position.
ReadBytes(Int32) Reads from the underlying stream in little-endian format. Advancing the position.
ReadDateTime Reads from the underlying stream in little-endian format. Advancing the position.
ReadDecimal Reads from the underlying stream in little-endian format. Advancing the position.
ReadDouble Reads from the underlying stream in little-endian format. Advancing the position.
ReadGuid Reads from the underlying stream in little-endian format. Advancing the position.
ReadInt16 Reads from the underlying stream in little-endian format. Advancing the position.
ReadInt32 Reads from the underlying stream in little-endian format. Advancing the position.
ReadInt64 Reads from the underlying stream in little-endian format. Advancing the position.
ReadInt8 Reads from the underlying stream in little-endian format. Advancing the position.
ReadSingle Reads from the underlying stream in little-endian format. Advancing the position.
ReadString Reads from the underlying stream in little-endian format. Advancing the position.
ReadUInt Reads from the underlying stream in little-endian format. Advancing the position.
ReadUInt16 Reads from the underlying stream in little-endian format. Advancing the position.
ReadUInt24 Reads from the underlying stream in little-endian format. Advancing the position.
ReadUInt32 Reads from the underlying stream in little-endian format. Advancing the position.
ReadUInt40 Reads from the underlying stream in little-endian format. Advancing the position.
ReadUInt48 Reads from the underlying stream in little-endian format. Advancing the position.
ReadUInt56 Reads from the underlying stream in little-endian format. Advancing the position.
ReadUInt64 Reads from the underlying stream in little-endian format. Advancing the position.
ReadUInt8 Reads from the underlying stream in little-endian format. Advancing the position.
RemoveBytes Removes a certain number of bytes from the stream, shifting valid data after this location to the left. The stream's position remains unchanged. (i.e., pointing to where the data used to exist).
Seek When overridden in a derived class, sets the position within the current stream.
SetLength When overridden in a derived class, sets the length of the current stream.
ToStringReturns a string that represents the current object.
(Inherited from Object)
TryReadBytes Attempts to read a byte array from the stream with a specified maximum length.
TryReadString Attempts to read a byte array from the stream with a specified maximum length.
UpdateLocalBuffer Updates the local buffer data.
Write(Boolean) Writes the specified value to the underlying stream in little-endian format.
Write(Byte) Writes the specified value to the underlying stream in little-endian format.
Write(Byte) Writes the specified value to the underlying stream in little-endian format.
Write(DateTime) Writes the specified value to the underlying stream in little-endian format.
Write(Decimal) Writes the specified value to the underlying stream in little-endian format.
Write(Double) Writes the specified value to the underlying stream in little-endian format.
Write(Guid) Writes the specified value to the underlying stream in little-endian format.
Write(Int16) Writes the specified value to the underlying stream in little-endian format.
Write(Int32) Writes the specified value to the underlying stream in little-endian format.
Write(Int64) Writes the specified value to the underlying stream in little-endian format.
Write(SByte) Writes the specified value to the underlying stream in little-endian format.
Write(Single) Writes the specified value to the underlying stream in little-endian format.
Write(String) Writes the specified value to the underlying stream in little-endian format.
Write(UInt16) Writes the specified value to the underlying stream in little-endian format.
Write(UInt32) Writes the specified value to the underlying stream in little-endian format.
Write(UInt64) Writes the specified value to the underlying stream in little-endian format.
Write(Byte*, Int32) Writes the specified buffer to the underlying stream in little-endian format.
Write(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.
Write7Bit(UInt32) Writes the specified value to the underlying stream in little-endian format.
Write7Bit(UInt64) Writes the specified value to the underlying stream in little-endian format.
WriteUInt Writes the specified value to the underlying stream in little-endian format.
WriteUInt24 Writes the specified value to the underlying stream in little-endian format.
WriteUInt40 Writes the specified value to the underlying stream in little-endian format.
WriteUInt48 Writes the specified value to the underlying stream in little-endian format.
WriteUInt56 Writes the specified value to the underlying stream in little-endian format.
WriteWithLength Writes the specified value to the underlying stream in little-endian format.

Fields

Stream A Stream implementation of this BinaryStreamBase
Utf8 A shared instance of UTF8 encoding.

See Also