public interface SerialPort
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the stream.
|
InputStream |
getInputStream()
Get the serial input stream.
|
String |
getName()
Get the name of the serial port, such as /dev/ttyUSB0 or
COM1.
|
OutputStream |
getOutputStream()
Get the serial output stream.
|
boolean |
isOpen()
Test if the stream is open.
|
void |
open(SerialParameters parameters)
Open the stream.
|
String getName()
void open(SerialParameters parameters) throws IOException
parameters - the desired serial parametersIOException - if any communication error occursvoid close()
throws IOException
IOException - if any communication error occursboolean isOpen()
InputStream getInputStream() throws IOException
The stream must have been opened via open(SerialParameters)
before calling this.
IOExceptionOutputStream getOutputStream() throws IOException
The stream must have been opened via open(SerialParameters)
before calling this.
IOException