public class SerialInputStream extends InputStream
Modifier and Type | Field and Description |
---|---|
static int |
AUXIN
AUXIN stram handles incoming data from the AUX serial port
|
static int |
AUXOUT
AUXOUT stram handles outgoing data to the AUX serial port
|
static int |
COMIN
COMIN stream handles incoming data from the RS-232 port (COM)
|
static int |
COMOUT
COMOUT stream handles outgoing data to the RS-232 port (COM)
|
int |
echoHandle
The default output handle is STDOUT
|
int |
inputHandle
The default input handle is STDIN
|
static int |
NULL
NULL output stream (bit bucket)
|
static int |
STDERR
STDERR stream generates outgoing data to both the STDOUT stream and
to the
errors.log file. |
static int |
STDIN
STDIN stream handles incoming data from the console
|
static int |
STDOUT
STDOUT stream generates outgoing data to the console
|
Constructor and Description |
---|
SerialInputStream()
Creates a serial connection
|
SerialInputStream(int hnd_in,
int hnd_out) |
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns the number of bytes that can be read from this input
stream without blocking.
|
void |
close()
close the port
|
protected void |
open()
open the port
|
int |
read()
Reads a character from the stream.
|
void |
setEcho(boolean echo)
Turns on and off echoing back characters read by this stream.
|
mark, markSupported, read, read, reset, skip
public static final int NULL
public static final int STDIN
public static final int STDOUT
public static final int STDERR
errors.log
file.public static final int COMIN
public static final int COMOUT
public static final int AUXIN
public static final int AUXOUT
public int inputHandle
public int echoHandle
public SerialInputStream()
public SerialInputStream(int hnd_in, int hnd_out)
hnd_in
- ?hnd_out
- ?protected void open()
public void close()
close
in class InputStream
public int read() throws IOException
read
in class InputStream
IOException
- on timeoutpublic int available()
available
in class InputStream
public void setEcho(boolean echo)
echo
- true if received data is to be echoed