Package gov.usgs.earthquake.product.io
Class DirectoryProductSource
java.lang.Object
gov.usgs.earthquake.product.io.DirectoryProductSource
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionDirectoryProductSource(File directory) Construct a new DirectoryProductSource object. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Free any resources associated with this source.voidstreamTo(ProductHandler out) Load Product from a directory, then send product events to the ProductOutput.
-
Constructor Details
-
DirectoryProductSource
Construct a new DirectoryProductSource object.- Parameters:
directory- the directory containing a product.
-
-
Method Details
-
streamTo
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:
Exception- if error occurs
-
close
public void close()Free any resources associated with this source.- Specified by:
closein interfaceProductSource
-