public class PortConnector4D extends Stream
| Modifier and Type | Field and Description |
|---|---|
static int |
BLUETOOTH |
static int |
DEFAULT |
static int |
IRCOMM |
static int |
PARITY_EVEN |
static int |
PARITY_NONE |
static int |
PARITY_ODD |
int |
readTimeout |
static int |
SIR |
boolean |
stopWriteCheckOnTimeout |
static int |
USB |
int |
writeTimeout |
skipBuffer| Constructor and Description |
|---|
PortConnector4D(int number,
int baudRate) |
PortConnector4D(int number,
int baudRate,
int bits,
boolean parity,
int stopBits) |
PortConnector4D(int number,
int baudRate,
int bits,
int parity,
int stopBits) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this I/O connection, releasing any associated resources.
|
protected void |
finalize() |
int |
readBytes(byte[] buf,
int start,
int count)
Reads bytes from the stream.
|
int |
readCheck() |
int |
readWriteBytes(byte[] buf,
int start,
int count,
boolean isRead) |
void |
setFlowControl(boolean on) |
int |
writeBytes(byte[] buf,
int start,
int count)
Writes bytes to the stream.
|
asInputStream, asOutputStream, asStream, asStream, skipBytes, wrapInputStream, wrapInputStreamToStream, write, writeBytes, writeBytes, writeBytespublic int readTimeout
public int writeTimeout
public boolean stopWriteCheckOnTimeout
public static final int DEFAULT
public static final int IRCOMM
public static final int SIR
public static final int USB
public static final int BLUETOOTH
public static final int PARITY_NONE
public static final int PARITY_EVEN
public static final int PARITY_ODD
public PortConnector4D(int number,
int baudRate,
int bits,
boolean parity,
int stopBits)
throws IllegalArgumentIOException,
IOException
public PortConnector4D(int number,
int baudRate)
throws IOException
IOExceptionpublic PortConnector4D(int number,
int baudRate,
int bits,
int parity,
int stopBits)
throws IllegalArgumentIOException,
IOException
public void close()
throws IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableIOException - If an I/O error occurs.public int readBytes(byte[] buf,
int start,
int count)
throws IOException
StreamreadBytes in class Streambuf - the byte array to read data intostart - the start position in the arraycount - the number of bytes to readIOExceptionpublic int writeBytes(byte[] buf,
int start,
int count)
throws IOException
StreamIOException if an error prevented the write
operation from occurring.writeBytes in class Streambuf - the byte array to write data fromstart - the start position in the byte arraycount - the number of bytes to writeIOExceptionpublic void setFlowControl(boolean on)
throws IOException
IOExceptionpublic int readWriteBytes(byte[] buf,
int start,
int count,
boolean isRead)
throws IOException
IOExceptionpublic int readCheck()
throws IOException
IOExceptionprotected void finalize()
finalize in class java.lang.Object