public interface SerialPortSocket extends Closeable
| Modifier and Type | Interface and Description |
|---|---|
static class |
SerialPortSocket.SerialPortSocketFactory |
| Modifier and Type | Field and Description |
|---|---|
static SerialPortSocket.SerialPortSocketFactory |
FACTORY |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close port.
|
Baudrate |
getBaudrate() |
DataBits |
getDatatBits() |
Set<FlowControl> |
getFlowControl() |
int |
getInBufferBytesCount()
Get bytes count in in buffer of port
|
InputStream |
getInputStream() |
int |
getOutBufferBytesCount()
Get bytes count out inbuffer of port
|
OutputStream |
getOutputStream() |
Parity |
getParity() |
String |
getPortName()
Getting port name under operation
|
StopBits |
getStopBits() |
char |
getXOFFChar() |
char |
getXONChar() |
boolean |
isClosed() |
boolean |
isCTS() |
boolean |
isDSR() |
boolean |
isIncommingRI() |
boolean |
isOpen()
Getting port state
|
void |
openAsIs()
Port opening
Note: If port busy TYPE_PORT_BUSY exception will be thrown. |
void |
openModem() |
void |
openRaw() |
void |
openRaw(Baudrate baudRate,
DataBits dataBits,
StopBits stopBits,
Parity parity,
Set<FlowControl> flowControls)
Setting the parameters of port
|
void |
openTerminal() |
void |
sendXOFF() |
void |
sendXON() |
void |
setBaudrate(Baudrate baudrate) |
void |
setBreak(boolean value)
Set Break singnal
|
void |
setDataBits(DataBits dataBits) |
void |
setDTR(boolean value)
Change DTR line state
|
void |
setFlowControl(Set<FlowControl> flowControls) |
void |
setParity(Parity parity) |
void |
setRTS(boolean value)
Change RTS line state
|
void |
setStopBits(StopBits stopBits) |
void |
setXOFFChar(char c) |
void |
setXONChar(char c) |
static final SerialPortSocket.SerialPortSocketFactory FACTORY
boolean isClosed()
boolean isCTS()
boolean isDSR()
boolean isIncommingRI()
InputStream getInputStream() throws IOException
IOExceptionOutputStream getOutputStream() throws IOException
IOExceptionString getPortName()
boolean isOpen()
void openAsIs()
throws IOException
SerialPortExceptionIOExceptionvoid openRaw()
throws IOException
IOExceptionvoid openTerminal()
throws IOException
IOExceptionvoid openModem()
throws IOException
IOExceptionvoid openRaw(Baudrate baudRate, DataBits dataBits, StopBits stopBits, Parity parity, Set<FlowControl> flowControls) throws IOException
baudRate - data transfer ratedataBits - number of data bitsstopBits - number of stop bitsparity - parityflowControls - IOExceptionvoid close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOExceptionvoid setRTS(boolean value)
throws IOException
value - true - ON, false - OFFIOExceptionvoid setDTR(boolean value)
throws IOException
value - true - ON, false - OFFIOExceptionvoid setXONChar(char c)
throws IOException
IOExceptionvoid setXOFFChar(char c)
throws IOException
IOExceptionchar getXONChar()
throws IOException
IOExceptionchar getXOFFChar()
throws IOException
IOExceptionvoid sendXON()
throws IOException
IOExceptionvoid sendXOFF()
throws IOException
IOExceptionint getInBufferBytesCount()
throws IOException
IOExceptionint getOutBufferBytesCount()
throws IOException
IOExceptionvoid setBreak(boolean value)
throws IOException
value - the valueIOExceptionvoid setFlowControl(Set<FlowControl> flowControls) throws IOException
IOExceptionvoid setBaudrate(Baudrate baudrate) throws IOException
IOExceptionvoid setDataBits(DataBits dataBits) throws IOException
IOExceptionvoid setStopBits(StopBits stopBits) throws IOException
IOExceptionvoid setParity(Parity parity) throws IOException
IOExceptionBaudrate getBaudrate() throws IOException
IOExceptionDataBits getDatatBits() throws IOException
IOExceptionStopBits getStopBits() throws IOException
IOExceptionParity getParity() throws IOException
IOExceptionSet<FlowControl> getFlowControl() throws IOException
IOExceptionCopyright © 2009–2015 atmodem4j. All rights reserved.