[]
        
(Showing Draft Content)

GrapeCity.Documents.Common.BigEndianBinaryReader

Class BigEndianBinaryReader

Namespace
GrapeCity.Documents.Common
Assembly
GcDocs.Imaging.dll

Analog of System.IO.BinaryReader but uses big-endian byte order.

public class BigEndianBinaryReader : IDisposable
Inheritance
object
BigEndianBinaryReader
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

BigEndianBinaryReader(Stream, bool)

Initializes a new instance of the BigEndianBinaryReader class.

public BigEndianBinaryReader(Stream baseStream, bool leaveOpen)

Parameters

baseStream System.IO.Stream

The underlying System.IO.Stream object.

leaveOpen bool

true to leave the stream open after the System.IO.BinaryReader object is disposed; otherwise, false.

Methods

Dispose()

Releases all resources used by the current instance of the BigEndianBinaryReader class.

public void Dispose()

Dispose(bool)

Releases the unmanaged resources used by the BigEndianBinaryReader class and optionally releases the managed resources.

protected void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

~BigEndianBinaryReader()

protected ~BigEndianBinaryReader()

ReadBytes(int)

Reads the specified number of bytes from the current stream into a byte array and advances the current position by that number of bytes.

public byte[] ReadBytes(int count)

Parameters

count int

The number of bytes to read. This value must be 0 or a non-negative number or an exception will occur.

Returns

byte[]

A byte array containing data read from the underlying stream. This might be less than the number of bytes requested if the end of the stream is reached.

ReadInt16()

Reads a 2-byte signed integer from the current stream and advances the current position of the stream by four bytes.

public short ReadInt16()

Returns

short

A 2-byte signed integer read from the current stream.

ReadInt32()

Reads a 4-byte signed integer from the current stream and advances the current position of the stream by four bytes.

public int ReadInt32()

Returns

int

A 4-byte signed integer read from the current stream.

ReadInt32LE()

Reads a 4-byte signed integer from the current stream using little-ending byte order and advances the current position of the stream by four bytes.

public int ReadInt32LE()

Returns

int

A 4-byte signed integer read from the current stream.

ReadUInt16()

Reads a 2-byte unsigned integer from the current stream and advances the current position of the stream by four bytes.

public ushort ReadUInt16()

Returns

ushort

A 2-byte unsigned integer read from the current stream.

ReadUInt32()

Reads a 4-byte unsigned integer from the current stream and advances the current position of the stream by four bytes.

public uint ReadUInt32()

Returns

uint

A 4-byte unsigned integer read from the current stream.