System.IO.BinaryReader.ReadBytesRequired(int)

Here are the examples of the csharp api System.IO.BinaryReader.ReadBytesRequired(int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

37 Examples 7

19 Source : BigEndianReader.cs
with GNU General Public License v3.0
from audiamus

public static UInt16 ReadUInt16BE (this BinaryReader binRdr) {
      return BitConverter.ToUInt16 (binRdr.ReadBytesRequired (sizeof (UInt16)).Reverse (), 0);
    }

19 Source : BigEndianReader.cs
with GNU General Public License v3.0
from audiamus

public static Int16 ReadInt16BE (this BinaryReader binRdr) {
      return BitConverter.ToInt16 (binRdr.ReadBytesRequired (sizeof (Int16)).Reverse (), 0);
    }

19 Source : BigEndianReader.cs
with GNU General Public License v3.0
from audiamus

public static UInt32 ReadUInt32BE (this BinaryReader binRdr) {
      return BitConverter.ToUInt32 (binRdr.ReadBytesRequired (sizeof (UInt32)).Reverse (), 0);
    }

19 Source : BigEndianReader.cs
with GNU General Public License v3.0
from audiamus

public static Int32 ReadInt32BE (this BinaryReader binRdr) {
      return BitConverter.ToInt32 (binRdr.ReadBytesRequired (sizeof (Int32)).Reverse (), 0);
    }

19 Source : BigEndianReader.cs
with GNU General Public License v3.0
from audiamus

public static UInt64 ReadUInt64BE (this BinaryReader binRdr) {
      return BitConverter.ToUInt64 (binRdr.ReadBytesRequired (sizeof (UInt64)).Reverse (), 0);
    }

19 Source : BigEndianReader.cs
with GNU General Public License v3.0
from audiamus

public static Int64 ReadInt64BE (this BinaryReader binRdr) {
      return BitConverter.ToInt64 (binRdr.ReadBytesRequired (sizeof (Int64)).Reverse (), 0);
    }

19 Source : BinaryReaderExtensions.cs
with MIT License
from hoppler

public static ushort ReadUInt16BE(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt16(binRdr.ReadBytesRequired(sizeof(ushort)).Reverse(), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from hoppler

public static short ReadInt16BE(this BinaryReader binRdr)
        {
            return BitConverter.ToInt16(binRdr.ReadBytesRequired(sizeof(short)).Reverse(), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from hoppler

public static uint ReadUInt32BE(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt32(binRdr.ReadBytesRequired(sizeof(uint)).Reverse(), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from hoppler

public static int ReadInt32BE(this BinaryReader binRdr)
        {
            return BitConverter.ToInt32(binRdr.ReadBytesRequired(sizeof(int)).Reverse(), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from hoppler

public static long ReadInt64BE(this BinaryReader binRdr)
        {
            return BitConverter.ToInt64(binRdr.ReadBytesRequired(sizeof(long)).Reverse(), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from hoppler

public static string ReadStringBE(this BinaryReader binRdr, int len)
        {
            return BitConverter.ToString(binRdr.ReadBytesRequired(len).Reverse(), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from hoppler

public static ulong ReadUInt64BE(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt64(binRdr.ReadBytesRequired(sizeof(ulong)).Reverse(), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from JadynWong

public static ushort ReadUInt16BE(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt16(BitConverter.IsLittleEndian ?
                binRdr.ReadBytesRequired(sizeof(ushort)).Reverse() :
                binRdr.ReadBytesRequired(sizeof(ushort)), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from JadynWong

public static short ReadInt16BE(this BinaryReader binRdr)
        {
            return BitConverter.ToInt16(BitConverter.IsLittleEndian ?
                binRdr.ReadBytesRequired(sizeof(short)).Reverse() :
                binRdr.ReadBytesRequired(sizeof(ushort)), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from JadynWong

public static uint ReadUInt32BE(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt32(BitConverter.IsLittleEndian ?
                binRdr.ReadBytesRequired(sizeof(uint)).Reverse() :
                binRdr.ReadBytesRequired(sizeof(uint)), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from JadynWong

public static uint ReadUInt32LE(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt32(BitConverter.IsLittleEndian ?
                binRdr.ReadBytesRequired(sizeof(uint)) :
                binRdr.ReadBytesRequired(sizeof(uint)).Reverse(), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from JadynWong

public static byte[] ReadBytesBE(this BinaryReader binRdr, int byteCount)
        {
            return BitConverter.IsLittleEndian
                ? binRdr.ReadBytesRequired(byteCount).ToArray()
                : binRdr.ReadBytesRequired(byteCount).Reverse().ToArray();
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from JadynWong

public static ushort ReadUInt16LE(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt16(BitConverter.IsLittleEndian ?
                binRdr.ReadBytesRequired(sizeof(ushort)) :
                binRdr.ReadBytesRequired(sizeof(ushort)).Reverse(), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from JadynWong

public static short ReadInt16LE(this BinaryReader binRdr)
        {
            return BitConverter.ToInt16(BitConverter.IsLittleEndian ?
                binRdr.ReadBytesRequired(sizeof(short)) :
                binRdr.ReadBytesRequired(sizeof(ushort)).Reverse(), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from JadynWong

public static int ReadInt32BE(this BinaryReader binRdr)
        {
            return BitConverter.ToInt32(BitConverter.IsLittleEndian ?
                binRdr.ReadBytesRequired(sizeof(int)).Reverse() :
                binRdr.ReadBytesRequired(sizeof(int)), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from JadynWong

public static int ReadInt32LE(this BinaryReader binRdr)
        {
            return BitConverter.ToInt32(BitConverter.IsLittleEndian ?
                binRdr.ReadBytesRequired(sizeof(int)) :
                binRdr.ReadBytesRequired(sizeof(int)).Reverse(), 0);
        }

19 Source : BinaryReaderExtensions.cs
with MIT License
from JadynWong

public static byte[] ReadBytesLE(this BinaryReader binRdr, int byteCount)
        {
            return BitConverter.IsLittleEndian
                ? binRdr.ReadBytesRequired(byteCount).ToArray()
                : binRdr.ReadBytesRequired(byteCount).Reverse().ToArray();
        }

19 Source : Decompressor.cs
with MIT License
from Pathos0925

public static UInt16 ReadUInt16BE(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt16(binRdr.ReadBytesRequired(sizeof(UInt16)).Reverse(), 0);
        }

19 Source : Decompressor.cs
with MIT License
from Pathos0925

public static Int16 ReadInt16BE(this BinaryReader binRdr)
        {
            return BitConverter.ToInt16(binRdr.ReadBytesRequired(sizeof(Int16)).Reverse(), 0);
        }

19 Source : Decompressor.cs
with MIT License
from Pathos0925

public static UInt32 ReadUInt32BE(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt32(binRdr.ReadBytesRequired(sizeof(UInt32)).Reverse(), 0);
        }

19 Source : Decompressor.cs
with MIT License
from Pathos0925

public static Int32 ReadInt32BE(this BinaryReader binRdr)
        {
            return BitConverter.ToInt32(binRdr.ReadBytesRequired(sizeof(Int32)).Reverse(), 0);
        }

19 Source : Decompressor.cs
with MIT License
from Pathos0925

public static UInt64 ReadUInt64BE(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt64(binRdr.ReadBytesRequired(sizeof(UInt64)).Reverse(), 0);
        }

19 Source : Decompressor.cs
with MIT License
from Pathos0925

public static Int64 ReadInt64BE(this BinaryReader binRdr)
        {
            return BitConverter.ToInt64(binRdr.ReadBytesRequired(sizeof(Int64)).Reverse(), 0);
        }

19 Source : BinaryReaderHelpers.cs
with MIT License
from SamboyCoding

public static short ReadInt16WithReversedBits(this BinaryReader binRdr)
        {
            return BitConverter.ToInt16(binRdr.ReadBytesRequired(sizeof(short)).Reverse(), 0);
        }

19 Source : BinaryReaderHelpers.cs
with MIT License
from SamboyCoding

public static ushort ReadUInt16WithReversedBits(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt16(binRdr.ReadBytesRequired(sizeof(ushort)).Reverse(), 0);
        }

19 Source : BinaryReaderHelpers.cs
with MIT License
from SamboyCoding

public static uint ReadUInt32WithReversedBits(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt32(binRdr.ReadBytesRequired(sizeof(uint)).Reverse(), 0);
        }

19 Source : BinaryReaderHelpers.cs
with MIT License
from SamboyCoding

public static int ReadInt32WithReversedBits(this BinaryReader binRdr)
        {
            return BitConverter.ToInt32(binRdr.ReadBytesRequired(sizeof(int)).Reverse(), 0);
        }

19 Source : BinaryReaderHelpers.cs
with MIT License
from SamboyCoding

public static ulong ReadUInt64WithReversedBits(this BinaryReader binRdr)
        {
            return BitConverter.ToUInt64(binRdr.ReadBytesRequired(sizeof(ulong)).Reverse(), 0);
        }

19 Source : BinaryReaderHelpers.cs
with MIT License
from SamboyCoding

public static long ReadInt64WithReversedBits(this BinaryReader binRdr)
        {
            return BitConverter.ToInt64(binRdr.ReadBytesRequired(sizeof(long)).Reverse(), 0);
        }

19 Source : BinaryReaderHelpers.cs
with MIT License
from SamboyCoding

public static float ReadSingleWithReversedBits(this BinaryReader binRdr)
        {
            return BitConverter.ToSingle(binRdr.ReadBytesRequired(sizeof(float)).Reverse(), 0);
        }

19 Source : BinaryReaderHelpers.cs
with MIT License
from SamboyCoding

public static double ReadDoubleWithReversedBits(this BinaryReader binRdr)
        {
            return BitConverter.ToDouble(binRdr.ReadBytesRequired(sizeof(double)).Reverse(), 0);
        }