public class SerialPortJavaComm extends SerialPort implements javax.comm.SerialPortEventListener
SerialPort.BaudRate, SerialPort.Parity| Constructor and Description |
|---|
SerialPortJavaComm(SerialParameters sp) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpened() |
void |
open() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
serialEvent(javax.comm.SerialPortEvent serialPortEvent) |
void |
setOpened(boolean opened) |
void |
setReadTimeout(int readTimeout) |
void |
write(byte[] bytes) |
void |
write(int b) |
getInputStream, getOutputStream, getReadTimeout, getSerialParameterspublic SerialPortJavaComm(SerialParameters sp)
public void write(int b)
throws IOException
write in class SerialPortIOExceptionpublic void write(byte[] bytes)
throws IOException
write in class SerialPortIOExceptionpublic void open()
throws SerialPortException
open in class SerialPortSerialPortExceptionpublic void setReadTimeout(int readTimeout)
setReadTimeout in class SerialPortpublic int read()
throws IOException
read in class SerialPortIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class SerialPortIOExceptionpublic void close()
close in class SerialPortpublic boolean isOpened()
isOpened in class SerialPortpublic void setOpened(boolean opened)
public void serialEvent(javax.comm.SerialPortEvent serialPortEvent)
serialEvent in interface javax.comm.SerialPortEventListenerCopyright © 2018. All rights reserved.