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 344 of file ByteStream.h.

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

Referenced by ByteStream::Memory::read().

{
  size_t retval;
  long tpos=tell();
  seek(pos, SEEK_SET, true);
  retval=readall(buffer,sz);
  seek(tpos, SEEK_SET, true);
  return retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index