/// <summary> /// Reads a short from the underlying stream. /// </summary> /// <returns>A short.</returns> public short ReadInt16() { lock (m_Reader) { if (Endian.IsBigEndian != m_IsBigEndian) { return(Endian.SwapInt16(m_Reader.ReadInt16())); } return(m_Reader.ReadInt16()); } }
/// <summary> /// Writes a short to the underlying stream. /// </summary> public void WriteInt16(short Val) { lock (m_Writer) { if (Endian.IsBigEndian != m_IsBigEndian) { Endian.SwapInt16(Val); m_Writer.Write(Val); return; } m_Writer.Write(Val); } }