System.IO.Stream.ReadInt32BE()

Here are the examples of the csharp api System.IO.Stream.ReadInt32BE() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

19 Source : StreamExtensions.cs
with MIT License
from GrapeCity

public static int ReadInt32(this Stream s, bool bigEndian)
        {
            return bigEndian ? s.ReadInt32BE() : s.ReadInt32LE();
        }

19 Source : StreamExtensions.cs
with The Unlicense
from marcussacana

public static uint ReadUInt32BE(this Stream s) => unchecked((uint)s.ReadInt32BE());

19 Source : StreamExtensions.cs
with GNU Lesser General Public License v3.0
from maxton

public static string ReadLengthPrefixedString(this Stream s, Encoding e, bool bigEdn = false)
    {
      int length = bigEdn ? s.ReadInt32BE() : s.ReadInt32LE();
      byte[] chars = new byte[length];
      s.Read(chars, 0, length);
      return e.GetString(chars);
    }