Class ZipProductSource

  • All Implemented Interfaces:
    ProductSource

    public class ZipProductSource
    extends java.lang.Object
    implements ProductSource
    Load a product from an InputStream containing ZIP. ZipProductSource reads an input stream containing a product zip file. This zip file's first entry must be a product xml file containing all product metadata and inline content.
    • Constructor Summary

      Constructors 
      Constructor Description
      ZipProductSource​(java.io.File zip)
      Construct a new ZipProductSource.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Free any resources associated with this handler.
      void streamTo​(ProductHandler out)
      Parse the zip stream and send product to product output.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ZipProductSource

        public ZipProductSource​(java.io.File zip)
        Construct a new ZipProductSource.
        Parameters:
        zip - the input stream where zip content is read.
    • Method Detail

      • streamTo

        public void streamTo​(ProductHandler out)
                      throws java.lang.Exception
        Parse the zip stream and send product to product output.
        Specified by:
        streamTo in interface ProductSource
        Parameters:
        out - ProductOutput that will receive the product.
        Throws:
        java.lang.Exception - if error occurs
      • close

        public void close()
        Free any resources associated with this handler.
        Specified by:
        close in interface ProductSource