Class WaczReader

java.lang.Object
org.netpreserve.jwarc.WaczReader
All Implemented Interfaces:
Closeable, AutoCloseable

public class WaczReader extends Object implements Closeable
Reader for Web Archive Collection Zipped (WACZ) files. EXPERIMENTAL API: May change or be removed without notice.
See Also:
  • Constructor Details

  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • metadata

      public Map<String,Object> metadata() throws IOException
      Retrieves the metadata from the WACZ file, reading it from "datapackage.json". Caches the result.
      Returns:
      a Map representing the metadata contained in "datapackage.json".
      Throws:
      IOException - if the WACZ file does not contain "datapackage.json", if the file cannot be read, or if "datapackage.json" is not a valid JSON object.