2020-04-21 01:33:41 -07:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2020-04-11 03:29:04 -07:00
|
|
|
using System.Buffers.Binary;
|
2016-10-26 12:29:56 -07:00
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
namespace DvdLib
|
|
|
|
{
|
|
|
|
public class BigEndianBinaryReader : BinaryReader
|
|
|
|
{
|
|
|
|
public BigEndianBinaryReader(Stream input)
|
|
|
|
: base(input)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public override ushort ReadUInt16()
|
|
|
|
{
|
2020-04-11 03:29:04 -07:00
|
|
|
return BinaryPrimitives.ReadUInt16BigEndian(base.ReadBytes(2));
|
2016-10-26 12:29:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public override uint ReadUInt32()
|
|
|
|
{
|
2020-04-11 03:29:04 -07:00
|
|
|
return BinaryPrimitives.ReadUInt32BigEndian(base.ReadBytes(4));
|
2016-10-26 12:29:56 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|