Package gov.usgs.earthquake.product.io
Class JsonProductSource
- java.lang.Object
-
- gov.usgs.earthquake.product.io.JsonProductSource
-
- All Implemented Interfaces:
ProductSource
public class JsonProductSource extends java.lang.Object implements ProductSource
Load a product from an InputStream containing Json.
-
-
Constructor Summary
Constructors Constructor Description JsonProductSource(java.io.InputStream in)Create a new JsonProductSource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Free any resources associated with this handler.voidstreamTo(ProductHandler out)Begin reading the input stream, sending events to out.
-
-
-
Method Detail
-
streamTo
public void streamTo(ProductHandler out) throws java.lang.Exception
Begin reading the input stream, sending events to out.- Specified by:
streamToin interfaceProductSource- Parameters:
out- the receiving ProductOutput.- Throws:
java.lang.Exception- if error occurs
-
close
public void close()
Free any resources associated with this handler.- Specified by:
closein interfaceProductSource
-
-