|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.freehep.record.loop.event.RecordAdapter org.freehep.record.loop.examples.EchoStrings
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.
Nested Class Summary | |
class |
EchoStrings.LineSupplier
Class to read in file line by line. |
class |
EchoStrings.StringsData
Class to hold line read in from file. |
Constructor Summary | |
EchoStrings()
Create an instance of this class. |
Method Summary | |
static void |
main(String[] args)
|
void |
recordSupplied(RecordSuppliedEvent event)
Called every time a new record is read by the SequentialRecordLoop's SequentialRecordSource object. |
Methods inherited from class org.freehep.record.loop.event.RecordAdapter |
configure, finish, reconfigure, resume, suspend |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EchoStrings()
Method Detail |
public void recordSupplied(RecordSuppliedEvent event)
RecordListener
recordSupplied
in interface RecordListener
recordSupplied
in class RecordAdapter
public static void main(String[] args) throws FileNotFoundException
FileNotFoundException
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |