com.engidea.comm
Class PortInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by 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.


Constructor Summary
PortInputStream(CommPort commPort)
           
 
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
 

Constructor Detail

PortInputStream

public PortInputStream(CommPort commPort)
Method Detail

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