Package gov.usgs.earthquake.product.io
Class JsonProductSource
java.lang.Object
gov.usgs.earthquake.product.io.JsonProductSource
- All Implemented Interfaces:
ProductSource
Load a product from an InputStream containing Json.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Free any resources associated with this handler.void
streamTo
(ProductHandler out) Begin reading the input stream, sending events to out.
-
Constructor Details
-
JsonProductSource
Create a new JsonProductSource.- Parameters:
in
- the input stream where Json is read.
-
-
Method Details
-
streamTo
Begin reading the input stream, sending events to out.- Specified by:
streamTo
in interfaceProductSource
- Parameters:
out
- the receiving ProductOutput.- Throws:
Exception
- if error occurs
-
close
public void close()Free any resources associated with this handler.- Specified by:
close
in interfaceProductSource
-