Package gov.usgs.earthquake.product.io
Class ZipProductSource
- java.lang.Object
-
- gov.usgs.earthquake.product.io.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.
-
-
-
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 interfaceProductSource
- 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 interfaceProductSource
-
-