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 voidclose()Free any resources associated with this handler.voidstreamTo(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:
streamToin 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:
closein interfaceProductSource
-
-