public static char ReadChar(this Stream stream) { byte[] buffer = new byte[sizeof(char)]; stream.Read(buffer, 0, buffer.Length); return(BytesTool.CharacterFromBytes(buffer)); }
public static uint ReadUnsignedInteger(this Stream stream) { byte[] buffer = new byte[sizeof(uint)]; stream.Read(buffer, 0, buffer.Length); return(BytesTool.UnsignedIntegerFromBytes(buffer)); }
public static ulong ReadUnsignedLong(this Stream stream) { byte[] buffer = new byte[sizeof(ulong)]; stream.Read(buffer, 0, buffer.Length); return(BytesTool.UnsignedLongFromBytes(buffer)); }
public static ushort ReadUnsignedShort(this Stream stream) { byte[] buffer = new byte[sizeof(ushort)]; stream.Read(buffer, 0, buffer.Length); return(BytesTool.UnsignedShortFromBytes(buffer)); }
public static float ReadFloat(this Stream stream) { byte[] buffer = new byte[sizeof(float)]; stream.Read(buffer, 0, buffer.Length); return(BytesTool.FloatFromBytes(buffer)); }
public static double ReadDouble(this Stream stream) { byte[] buffer = new byte[sizeof(double)]; stream.Read(buffer, 0, buffer.Length); return(BytesTool.DoubleFromBytes(buffer)); }