public float ReadSingle() { var bytes = new byte[sizeof(float)]; _stream.Read(bytes, 0, sizeof(float)); return(EndianAwareBitConverter.ToSingle(bytes, Endianness)); }
public long ReadInt64() { var bytes = new byte[sizeof(long)]; _stream.Read(bytes, 0, sizeof(long)); return(EndianAwareBitConverter.ToInt64(bytes, Endianness)); }
public int ReadInt32() { var bytes = new byte[sizeof(int)]; _stream.Read(bytes, 0, sizeof(int)); return(EndianAwareBitConverter.ToInt32(bytes, Endianness)); }
public short ReadInt16() { var bytes = new byte[sizeof(short)]; _stream.Read(bytes, 0, sizeof(short)); return(EndianAwareBitConverter.ToInt16(bytes, Endianness)); }
public double ReadDouble() { var bytes = new byte[sizeof(double)]; _stream.Read(bytes, 0, sizeof(double)); return(EndianAwareBitConverter.ToDouble(bytes, Endianness)); }
public void WriteDouble(double value) { var bytes = EndianAwareBitConverter.GetBytes(value, Endianness); _stream.Write(bytes, 0, bytes.Length); }