Package gov.usgs.earthquake.product.io
Class DirectoryProductSource
- java.lang.Object
-
- gov.usgs.earthquake.product.io.DirectoryProductSource
-
- All Implemented Interfaces:
ProductSource
public class DirectoryProductSource extends java.lang.Object implements ProductSource
Load a product from a Directory. Usually a directory is created using DirectoryProductOutput. It should contain a product xml file named "product.xml". All other files are treated as attachments.
-
-
Constructor Summary
Constructors Constructor Description DirectoryProductSource(java.io.File directory)Construct a new DirectoryProductSource object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Free any resources associated with this source.voidstreamTo(ProductHandler out)Load Product from a directory, then send product events to the ProductOutput.
-
-
-
Method Detail
-
streamTo
public void streamTo(ProductHandler out) throws java.lang.Exception
Load Product from a directory, then send product events to the ProductOutput.- Specified by:
streamToin interfaceProductSource- Parameters:
out- the ProductOutput that will receive the product.- Throws:
java.lang.Exception- if error occurs
-
close
public void close()
Free any resources associated with this source.- Specified by:
closein interfaceProductSource
-
-