Beispiel #1
0
 /// <summary>
 /// Writes a four-byte floating-point value to the current stream using BigEndian encoding
 /// and advances the stream position by four bytes.
 /// </summary>
 /// <param name="value">The four-byte floating-point value to write.</param>
 /// <exception cref="T:System.ObjectDisposedException">The stream is closed. </exception>
 /// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
 public override void Write(float value)
 {
     base.Write(BitTweaks.ReverseByteOrder(value));
 }
Beispiel #2
0
 /// <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());
Beispiel #3
0
 /// <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());
 public override uint ReadUInt32()
 {
     return(BitTweaks.ReverseByteOrder(base.ReadUInt32()));
 }
 public override ushort ReadUInt16()
 {
     return(BitTweaks.ReverseByteOrder(base.ReadUInt16()));
 }
 /// <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()));
 }
 /// <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()));
 }
 public override ulong ReadUInt64()
 {
     return(BitTweaks.ReverseByteOrder(base.ReadUInt64()));
 }