jcontrol.comm
Interface ConsoleInputStream
- All Superinterfaces:
- BasicInputStream
- All Known Implementing Classes:
- Console, Resource, RS232
public interface ConsoleInputStream
- extends BasicInputStream
Provides a set of high-level communication methods for reading on a console.
Field Summary |
static String |
LF_CHARS
The standard linefeed characters to parse. |
Method Summary |
String |
readLine()
Reads a single String from the stream. |
LF_CHARS
static final String LF_CHARS
- The standard linefeed characters to parse. May be ignored by implementing classes.
- See Also:
- Constant Field Values
readLine
String readLine()
throws IOException
- Reads a single
String
from the stream. This is a blocking operation, if there is no data
available the current Thread
is yielded and should be woken up if data
arrives. Implementing classes may throw an IOException
if a timeout is
reached. The String is received character-by-character until an linefeed character is received.
- Returns:
- the
String
read
- Throws:
IOException
- if an error occurs- See Also:
String