public short GetInt16() { if (ReadBytes + sizeof(short) > WrittenBytes) throw new AegisException(AegisResult.BufferUnderflow, "No more readable buffer."); var val = BitConverter.ToInt16(Buffer, ReadBytes); ReadBytes += sizeof(short); return val; }