public override void Write(uint value) { base.Write(BitTweaks.ReverseByteOrder(value)); }
public override ushort ReadUInt16() { return(BitTweaks.ReverseByteOrder(base.ReadUInt16())); }
public override uint ReadUInt32() { return(BitTweaks.ReverseByteOrder(base.ReadUInt32())); }
/// <summary> /// Reads a 4-byte floating point value from the current stream using big endian encoding /// and advances the current position of the stream by four bytes. /// </summary> /// <returns> /// A 4-byte floating point value read from the current stream. /// </returns> /// <exception cref="T:System.ObjectDisposedException">The stream is closed. </exception> /// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception> /// <exception cref="T:System.IO.EndOfStreamException">The end of the stream is reached. </exception> public override float ReadSingle() { return(BitTweaks.ReverseByteOrder(base.ReadSingle())); }
/// <summary> /// Reads an 8-byte floating point value from the current stream using big endian encoding /// and advances the current position of the stream by eight bytes. /// </summary> /// <returns> /// An 8-byte floating point value read from the current stream. /// </returns> /// <exception cref="T:System.ObjectDisposedException">The stream is closed. </exception> /// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception> /// <exception cref="T:System.IO.EndOfStreamException">The end of the stream is reached. </exception> public override double ReadDouble() { return(BitTweaks.ReverseByteOrder(base.ReadDouble())); }
public override ulong ReadUInt64() { return(BitTweaks.ReverseByteOrder(base.ReadUInt64())); }
/// <summary> /// Reads a 8-byte signed integer using the big-endian layout from the current stream /// and advances the current position of the stream by two bytes. /// </summary> /// <param name="value">The four-byte signed integer to write.</param> public void WriteDoubleBE(double value) => this.Write(BitTweaks.ReverseByteOrder(value));
/// <summary> /// Reads a 4-byte signed integer using the big-endian layout from the current stream /// and advances the current position of the stream by two bytes. /// </summary> /// <param name="value">The four-byte signed integer to write.</param> public void WriteIntBE(int value) => this.Write(BitTweaks.ReverseByteOrder(value));
/// <summary> /// Reads a 8-byte signed double using the big-endian layout /// from the current stream and advances the current position of the stream by eight bytes. /// </summary> /// <returns></returns> public double ReadDoubleBE() => BitTweaks.ReverseByteOrder(this.ReadDouble());
/// <summary> /// Reads a 4-byte signed integer using the big-endian layout /// from the current stream and advances the current position of the stream by four bytes. /// </summary> /// <returns></returns> public int ReadInt32BE() => BitTweaks.ReverseByteOrder(this.ReadInt32());