public class SerialPortClient extends Stream
skipBuffer
Constructor and Description |
---|
SerialPortClient(java.lang.String address,
int port,
java.lang.String[] params) |
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 |
writeBytes(byte[] buf,
int start,
int count)
Writes bytes to the stream.
|
asInputStream, asOutputStream, asStream, asStream, skipBytes, wrapInputStream, wrapInputStreamToStream, write, writeBytes, writeBytes, writeBytes
public SerialPortClient(java.lang.String address, int port, java.lang.String[] params) throws IOException
IOException
public int readBytes(byte[] buf, int start, int count) throws IOException
Stream
readBytes
in class Stream
buf
- the byte array to read data intostart
- the start position in the arraycount
- the number of bytes to readIOException
public int writeBytes(byte[] buf, int start, int count) throws IOException
Stream
IOException
if an error prevented the write
operation from occurring.writeBytes
in class Stream
buf
- the byte array to write data fromstart
- the start position in the byte arraycount
- the number of bytes to writeIOException
public void close() throws IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
IOException
- If an I/O error occurs.protected void finalize()
finalize
in class java.lang.Object