Search Results for

    Show / Hide Table of Contents

    Class BiEndianBinaryReader

    Extends the BinaryReader class to allow reading values in the specified format.

    Inheritance
    object
    BinaryReader
    BiEndianBinaryReader
    Implements
    IDisposable
    Inherited Members
    BinaryReader.Close()
    BinaryReader.Dispose()
    BinaryReader.Dispose(bool)
    BinaryReader.FillBuffer(int)
    BinaryReader.PeekChar()
    BinaryReader.Read()
    BinaryReader.Read(byte[], int, int)
    BinaryReader.Read(char[], int, int)
    BinaryReader.Read7BitEncodedInt()
    BinaryReader.ReadBoolean()
    BinaryReader.ReadByte()
    BinaryReader.ReadBytes(int)
    BinaryReader.ReadChar()
    BinaryReader.ReadChars(int)
    BinaryReader.ReadSByte()
    BinaryReader.BaseStream
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.IO
    Assembly: NetTopologySuite.dll
    Syntax
    public class BiEndianBinaryReader : BinaryReader, IDisposable
    Remarks

    While BiEndianBinaryReader extends BinaryReader adding methods for reading integer values (ReadInt32()) and double values (ReadDouble()) in the specified format, this implementation overrides methods, such ReadInt32() and ReadDouble() and more, for reading values in the specified by Endianess format.

    Constructors

    | Edit this page View Source

    BiEndianBinaryReader(Stream)

    Initializes a new instance of the BiEndianBinaryReader class.

    Declaration
    public BiEndianBinaryReader(Stream stream)
    Parameters
    Type Name Description
    Stream stream

    The stream.

    | Edit this page View Source

    BiEndianBinaryReader(Stream, ByteOrder)

    Initializes a new instance of the BiEndianBinaryReader class.

    Declaration
    public BiEndianBinaryReader(Stream input, ByteOrder endianess)
    Parameters
    Type Name Description
    Stream input

    The supplied stream.

    ByteOrder endianess

    The byte order.

    Exceptions
    Type Condition
    ArgumentException

    The stream does not support reading, the stream is null, or the stream is already closed.

    Properties

    | Edit this page View Source

    Endianess

    Encoding type

    Declaration
    public ByteOrder Endianess { get; set; }
    Property Value
    Type Description
    ByteOrder

    Methods

    | Edit this page View Source

    ReadDecimal()

    Reads a decimal value from the current stream and advances the current position of the stream by sixteen bytes.

    Declaration
    public override decimal ReadDecimal()
    Returns
    Type Description
    decimal

    A decimal value read from the current stream.

    Overrides
    BinaryReader.ReadDecimal()
    Exceptions
    Type Condition
    ObjectDisposedException

    The stream is closed.

    IOException

    An I/O error occurs.

    EndOfStreamException

    The end of the stream is reached.

    | Edit this page View Source

    ReadDouble()

    Reads an 8-byte floating point value from the current stream using the specified encoding and advances the current position of the stream by eight bytes.

    Declaration
    public override double ReadDouble()
    Returns
    Type Description
    double

    An 8-byte floating point value read from the current stream.

    Overrides
    BinaryReader.ReadDouble()
    Exceptions
    Type Condition
    ObjectDisposedException

    The stream is closed.

    IOException

    An I/O error occurs.

    EndOfStreamException

    The end of the stream is reached.

    | Edit this page View Source

    ReadInt16()

    Reads a 2-byte signed integer from the current stream using the specified encoding and advances the current position of the stream by two bytes.

    Declaration
    public override short ReadInt16()
    Returns
    Type Description
    short

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

    Overrides
    BinaryReader.ReadInt16()
    Exceptions
    Type Condition
    ObjectDisposedException

    The stream is closed.

    IOException

    An I/O error occurs.

    EndOfStreamException

    The end of the stream is reached.

    | Edit this page View Source

    ReadInt32()

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

    Declaration
    public override int ReadInt32()
    Returns
    Type Description
    int

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

    Overrides
    BinaryReader.ReadInt32()
    Exceptions
    Type Condition
    ObjectDisposedException

    The stream is closed.

    IOException

    An I/O error occurs.

    EndOfStreamException

    The end of the stream is reached.

    | Edit this page View Source

    ReadInt64()

    Reads an 8-byte signed integer from the current stream using the specified encoding and advances the current position of the stream by eight bytes.

    Declaration
    public override long ReadInt64()
    Returns
    Type Description
    long

    An 8-byte signed integer read from the current stream.

    Overrides
    BinaryReader.ReadInt64()
    Exceptions
    Type Condition
    ObjectDisposedException

    The stream is closed.

    IOException

    An I/O error occurs.

    EndOfStreamException

    The end of the stream is reached.

    | Edit this page View Source

    ReadSingle()

    Reads a 4-byte floating point value from the current stream using the specified encoding and advances the current position of the stream by four bytes.

    Declaration
    public override float ReadSingle()
    Returns
    Type Description
    float

    A 4-byte floating point value read from the current stream.

    Overrides
    BinaryReader.ReadSingle()
    Exceptions
    Type Condition
    ObjectDisposedException

    The stream is closed.

    IOException

    An I/O error occurs.

    EndOfStreamException

    The end of the stream is reached.

    | Edit this page View Source

    ReadString()

    Reads a string from the current stream. The string is prefixed with the length, encoded as an integer seven bits at a time.

    Declaration
    public override string ReadString()
    Returns
    Type Description
    string

    The string being read.

    Overrides
    BinaryReader.ReadString()
    Exceptions
    Type Condition
    ObjectDisposedException

    The stream is closed.

    IOException

    An I/O error occurs.

    EndOfStreamException

    The end of the stream is reached.

    | Edit this page View Source

    ReadUInt16()

    Reads a 2-byte unsigned integer from the current stream using the specified encoding and advances the position of the stream by two bytes.

    Declaration
    [CLSCompliant(false)]
    public override ushort ReadUInt16()
    Returns
    Type Description
    ushort

    A 2-byte unsigned integer read from this stream.

    Overrides
    BinaryReader.ReadUInt16()
    Exceptions
    Type Condition
    ObjectDisposedException

    The stream is closed.

    IOException

    An I/O error occurs.

    EndOfStreamException

    The end of the stream is reached.

    | Edit this page View Source

    ReadUInt32()

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

    Declaration
    [CLSCompliant(false)]
    public override uint ReadUInt32()
    Returns
    Type Description
    uint

    A 4-byte unsigned integer read from this stream.

    Overrides
    BinaryReader.ReadUInt32()
    Exceptions
    Type Condition
    ObjectDisposedException

    The stream is closed.

    IOException

    An I/O error occurs.

    EndOfStreamException

    The end of the stream is reached.

    | Edit this page View Source

    ReadUInt64()

    Reads an 8-byte unsigned integer from the current stream using the specified encoding and advances the position of the stream by eight bytes.

    Declaration
    [CLSCompliant(false)]
    public override ulong ReadUInt64()
    Returns
    Type Description
    ulong

    An 8-byte unsigned integer read from this stream.

    Overrides
    BinaryReader.ReadUInt64()
    Exceptions
    Type Condition
    ObjectDisposedException

    The stream is closed.

    IOException

    An I/O error occurs.

    EndOfStreamException

    The end of the stream is reached.

    Implements

    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX