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