public short ReadShortLE() { int ch1 = this.Read(); int ch2 = this.Read(); if ((ch1 | ch2) < 0) throw new EndOfStreamException(); return (short)((ch2 << 8) + (ch1 << 0)); }
// Methods to read primitive data types from the stream private short ReadShort(RandomAccessFileOrArray stream) { if (isBigEndian) { return stream.ReadShort(); } else { return stream.ReadShortLE(); } }