Logo Search packages:      
Sourcecode: djvulibre version File versions

bool DjVuFile::contains_meta ( void   ) 

Returns TRUE# if the file contains metadata chunks. Known metadata chunks at the time of writing this help are: { METa}, and { METz}.

Definition at line 2176 of file DjVuFile.cpp.

References IFFByteStream::close_chunk(), ByteStream::create(), ByteStream::EndOfFile, and IFFByteStream::get_chunk().

Referenced by change_meta().

  const GP<ByteStream> str(data_pool->get_stream());
  GUTF8String chkid;
  const GP<IFFByteStream> giff(IFFByteStream::create(str));
  IFFByteStream &iff=*giff;
  if (!iff.get_chunk(chkid))
    G_THROW( ByteStream::EndOfFile );
    if (is_meta(chkid))
      return true;
  return false;

Generated by  Doxygen 1.6.0   Back to index