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

size_t ByteStream::write ( const void *  buffer,
size_t  size 
) [virtual, inherited]

Writes data to a ByteStream. This function {must} be implemented by each subclass of ByteStream#. At most size# bytes from buffer buffer# are written to the ByteStream. Function write# returns immediately if size# is zero. The actual number of bytes written is returned. Function write# may also return a value greater than zero but smaller than size# for internal reasons. Programs must be ready to handle these cases or use function {writall}. Exception {GException} is thrown with a plain text error message whenever an error occurs.

Reimplemented in ByteStream::Stdio, ByteStream::Memory, and UnicodeByteStream.

Definition at line 334 of file ByteStream.cpp.

Referenced by GBitmap::save_pbm(), GBitmap::save_pgm(), GPixmap::save_ppm(), ByteStream::writall(), and ByteStream::write8().

{
  G_THROW( ERR_MSG("ByteStream.cant_write") );      //  Cannot write from a ByteStream created for reading
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index