public virtual long readS2()
{
int c1 = r();
int c2 = r();
if ((c1 | c2) < 0) throw IOErr.make("Unexpected end of stream").val;
if (m_bigEndian)
return (short)(c1 << 8 | c2);
else
return (short)(c2 << 8 | c1);
}