org.freehep.record.loop.examples
Class EchoStrings
java.lang.Object
org.freehep.record.loop.event.RecordAdapter
org.freehep.record.loop.examples.EchoStrings
- All Implemented Interfaces:
- EventListener, RecordListener
public class EchoStrings
- extends RecordAdapter
This class gives the most basic example of how the org.freehep.record.loop
package can be used. It implements, as a nested class,
a SequentialRecordSource
that reads
a file and supplys each line read as a record. The class itself implements a
RecordListener
that prints the contents of each
record, with which it is supplied, to the standard output.
- Version:
- $Id: EchoStrings.java 8584 2006-08-10 23:06:37Z duns $
- Author:
- patton
Constructor Summary |
EchoStrings()
Create an instance of this class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EchoStrings
public EchoStrings()
- Create an instance of this class.
recordSupplied
public void recordSupplied(RecordSuppliedEvent event)
- Description copied from interface:
RecordListener
- Called every time a new record is read by the SequentialRecordLoop's
SequentialRecordSource object.
- Specified by:
recordSupplied
in interface RecordListener
- Overrides:
recordSupplied
in class RecordAdapter
- Parameters:
event
- a RecordSuppliedEvent describing the data supplied.
main
public static void main(String[] args)
throws FileNotFoundException
- Throws:
FileNotFoundException
Copyright © 2000-2007 FreeHEP. All Rights Reserved.