public void Write(double value) { if (needConvertEndian) { writer.Write(EndianSwap.SwapInt64(EndianSwap.DoubleToInt64Bits(value))); } else { writer.Write(value); } }
public float ReadSingle() { if (needConvertEndian) { return(EndianSwap.Int32BitsToFloat(EndianSwap.SwapInt32(reader.ReadInt32()))); } else { return(reader.ReadSingle()); } }
public void Write(float value) { if (needConvertEndian) { writer.Write(EndianSwap.SwapInt32(EndianSwap.FloatToInt32Bits(value))); } else { writer.Write(value); } }
public double ReadDouble() { if (needConvertEndian) { return(EndianSwap.Int64BitsToDouble(EndianSwap.SwapInt64(reader.ReadInt64()))); } else { return(reader.ReadDouble()); } }
public void Write(ulong value) { writer.Write(needConvertEndian ? EndianSwap.SwapUInt64(value) : value); }
public void Write(uint value) { writer.Write(needConvertEndian ? EndianSwap.SwapUInt32(value) : value); }
public void Write(ushort value) { writer.Write(needConvertEndian ? EndianSwap.SwapUInt16(value) : value); }
public ulong ReadUInt64() { return(needConvertEndian ? EndianSwap.SwapUInt64(reader.ReadUInt64()) : reader.ReadUInt64()); }
public int ReadInt32() { return(needConvertEndian ? EndianSwap.SwapInt32(reader.ReadInt32()) : reader.ReadInt32()); }
public ushort ReadUInt16() { return(needConvertEndian ? EndianSwap.SwapUInt16(reader.ReadUInt16()) : reader.ReadUInt16()); }