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 TypeMethodDescriptionvoid
close()
Free any resources associated with this source.void
streamTo
(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:
streamTo
in 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:
close
in interfaceProductSource
-