Source/NFX/IOMiscUtils.cs
/// <summary>
/// Reads a short encoded as big endian from stream
/// </summary>
Reads a short encoded as big endian from stream
Reads a short encoded as big endian from stream
public static short ReadBEShort(this Stream s)
        {
            var b1 = s.ReadByte();
            if (b1<0) throw new IO.NFXIOException(StringConsts.STREAM_READ_EOF_ERROR+"ReadBEShort()");
            var b2 = s.ReadByte();
            if (b2<0) throw new IO.NFXIOException(StringConsts.STREAM_READ_EOF_ERROR+"ReadBEShort()");
            return (short)(
                         (b1 << 8 ) +
                         (b2)
                        );
        }
public static short ReadBEShort ( this Stream s ) { var b1 = s . ReadByte ( ) ; if ( b1 < 0 ) throw new IO . NFXIOException ( StringConsts . STREAM_READ_EOF_ERROR + " " ) ; var b2 = s . ReadByte ( ) ; if ( b2 < 0 ) throw new IO . NFXIOException ( StringConsts . STREAM_READ_EOF_ERROR + " " ) ; return ( short ) ( ( b1 << 8 ) + ( b2 ) ) ; }
Reads a short encoded as big endian from stream
Reads a short encoded as big endian from stream
Stream
this