Class ZipProductHandler

java.lang.Object
gov.usgs.earthquake.product.io.ObjectProductHandler
gov.usgs.earthquake.product.io.ZipProductHandler
All Implemented Interfaces:
ProductHandler

public class ZipProductHandler extends ObjectProductHandler
Store a product to an OutputStream using ZIP. Accumulates entire product the same as ObjectProductOutput, then onEndProduct outputs a zip file containing "product.xml" as the first entry and all product content as other entries. Because the zip file is not written until after all content has been "received", all product content may result in in-memory buffering. This is not the case when dealing with File-backed products. If this is a concern, users are encouraged to use the Xml Input and Output classes, which always use streams and never buffer content.
  • Field Details

    • PRODUCT_XML_ZIP_ENTRYNAME

      public static final String PRODUCT_XML_ZIP_ENTRYNAME
      The entry filename used for product metadata.
      See Also:
  • Constructor Details

    • ZipProductHandler

      public ZipProductHandler(OutputStream out)
      Construct a new ZipProductHandler object.
      Parameters:
      out - the output stream where zip content is written.
  • Method Details