com.engidea.comm
Class PortInputStream
java.lang.Object
java.io.InputStream
com.engidea.comm.PortInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class PortInputStream
- extends java.io.InputStream
If you want to have an input stream instead of read you can just
new PortInputStream(commPort) and you can have an input stream.
Method Summary |
int |
available()
|
int |
read()
|
int |
read(byte[] buff)
|
int |
read(byte[] buff,
int offset,
int len)
|
Methods inherited from class java.io.InputStream |
close, mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PortInputStream
public PortInputStream(CommPort commPort)
read
public int read()
throws java.io.IOException
- Specified by:
read
in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] buff)
throws java.io.IOException
- Overrides:
read
in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] buff,
int offset,
int len)
throws java.io.IOException
- Overrides:
read
in class java.io.InputStream
- Throws:
java.io.IOException
available
public int available()
throws java.io.IOException
- Overrides:
available
in class java.io.InputStream
- Throws:
java.io.IOException