Logo Search packages:      
Sourcecode: djvulibre version File versions  Download package

size_t ByteStream::readat ( void *  buffer,
size_t  sz,
int  pos 
) [inline, virtual, inherited]

Reads data from a random position. This function reads at most sz# bytes at position pos# into buffer# and returns the actual number of bytes read. The current position is unchanged.

Reimplemented in ByteStream::Memory.

Definition at line 349 of file ByteStream.h.

References ByteStream::readall(), ByteStream::seek(), and ByteStream::tell().

Referenced by ByteStream::get_data().

  size_t retval;
  long tpos=tell();
  seek(pos, SEEK_SET, true);
  seek(tpos, SEEK_SET, true);
  return retval;

Generated by  Doxygen 1.6.0   Back to index