public class PortInputStream
extends java.io.InputStream
Constructor and Description |
---|
PortInputStream(PortInterface port) |
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns the number of bytes available at the port.
|
void |
close()
Close the stream and the port.
|
int |
read()
Reads a single byte from the port.
|
int |
read(byte[] b)
Read a byte array from the port.
|
int |
read(byte[] b,
int offset,
int length)
Read a byte array from the port.
|
public PortInputStream(PortInterface port)
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
PortInterface.available()
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
PortInterface.close()
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
PortInterface.read()
public int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
PortInterface.read(byte[])
public int read(byte[] b, int offset, int length) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
PortInterface.read(byte[], int, int)
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.