Package gov.usgs.earthquake.product.io
Class JsonProductHandler
- java.lang.Object
-
- gov.usgs.earthquake.product.io.ObjectProductHandler
-
- gov.usgs.earthquake.product.io.JsonProductHandler
-
- All Implemented Interfaces:
ProductHandler
public class JsonProductHandler extends ObjectProductHandler
Store a product as Json.
-
-
Constructor Summary
Constructors Constructor Description JsonProductHandler(java.io.OutputStream out)
Construct a new ZipProductHandler object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Free any resources associated with this handler.void
onEndProduct(ProductId id)
Creates and outputs the zip stream.-
Methods inherited from class gov.usgs.earthquake.product.io.ObjectProductHandler
getProduct, getProduct, onBeginProduct, onContent, onLink, onProperty, onSignature, onSignatureVersion
-
-
-
-
Method Detail
-
onEndProduct
public void onEndProduct(ProductId id) throws java.lang.Exception
Creates and outputs the zip stream.- Specified by:
onEndProduct
in interfaceProductHandler
- Overrides:
onEndProduct
in classObjectProductHandler
- Parameters:
id
- which product.- Throws:
java.lang.Exception
- if error occurs
-
close
public void close()
Free any resources associated with this handler.- Specified by:
close
in interfaceProductHandler
- Overrides:
close
in classObjectProductHandler
-
-