Class 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 Detail

      • PRODUCT_XML_ZIP_ENTRYNAME

        public static final java.lang.String PRODUCT_XML_ZIP_ENTRYNAME
        The entry filename used for product metadata.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ZipProductHandler

        public ZipProductHandler​(java.io.OutputStream out)
        Construct a new ZipProductHandler object.
        Parameters:
        out - the output stream where zip content is written.