Logo Search packages:      
Sourcecode: djvulibre version File versions

unsigned int ByteStream::read16 (  )  [inherited]

Reads a two-bytes integer from a ByteStream. The integer most significant byte is read first, regardless of the processor endianness.

Definition at line 556 of file ByteStream.cpp.

References ByteStream::EndOfFile, and ByteStream::readall().

Referenced by DjVmDir0::decode(), DjVmDir::decode(), MMRDecoder::decode_header(), and GPixmap::init().

{
  unsigned char c[2];
  if (readall((void*)c, sizeof(c)) != sizeof(c))
    G_THROW( ByteStream::EndOfFile );
  return (c[0]<<8)+c[1];
}


Generated by  Doxygen 1.6.0   Back to index