public interface SerialPortFactory
| 限定符和类型 | 方法和说明 |
|---|---|
SerialPort |
createSerialPort(String portName)
Creates a
SerialPort instance out of the given portName. |
<T extends SerialPort> |
createSerialPort(String portName,
Class<T> expectedClass)
Creates a
SerialPort instance out of the given portName. |
<T extends SerialPort> T createSerialPort(String portName, Class<T> expectedClass) throws PortInUseException, NoSuchPortException, UnsupportedCommOperationException
SerialPort instance out of the given portName.portName - The port's name to parse out whether to create a serial connection or a remote (rfc2217) connection.expectedClass - The SerialPort class that is expected to return.PortInUseExceptionNoSuchPortExceptionUnsupportedCommOperationExceptionSerialPort createSerialPort(String portName) throws PortInUseException, NoSuchPortException, UnsupportedCommOperationException
SerialPort instance out of the given portName.portName - The port's name to parse out whether to create a serial connection or a remote (rfc2217) connection.PortInUseExceptionNoSuchPortExceptionUnsupportedCommOperationExceptionCopyright © 2020. All rights reserved.