Package gov.usgs.earthquake.product.io
Class ZipProductSource
java.lang.Object
gov.usgs.earthquake.product.io.ZipProductSource
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Free any resources associated with this handler.void
streamTo
(ProductHandler out) Parse the zip stream and send product to product output.
-
Constructor Details
-
ZipProductSource
Construct a new ZipProductSource.- Parameters:
zip
- the input stream where zip content is read.
-
-
Method Details
-
streamTo
Parse the zip stream and send product to product output.- Specified by:
streamTo
in interfaceProductSource
- Parameters:
out
- ProductOutput that will receive the product.- Throws:
Exception
- if error occurs
-
close
public void close()Free any resources associated with this handler.- Specified by:
close
in interfaceProductSource
-