|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--BusReader
This class reads lines of text from an input stream reader and interprets them as bus events.
Constructor Summary | |
BusReader(java.lang.String fn)
Create a new BusReader object with which to read from a file. |
|
BusReader(java.lang.String host,
int port)
Create a new BusReader object with which to read a network port. |
Method Summary | |
void |
close()
Close the stream. |
hw7.TransitBusEvent |
getNextTransitBusEvent()
Read one line from the input stream, decode it, construct a new TransitBusEvent, and return that to the caller. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BusReader(java.lang.String host, int port) throws java.io.IOException
host
- the name of the host to read.port
- the number of the port to readpublic BusReader(java.lang.String fn) throws java.io.IOException
Method Detail |
public hw7.TransitBusEvent getNextTransitBusEvent()
public void close() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |