com.engidea.comm
Class PortOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.engidea.comm.PortOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class PortOutputStream
extends java.io.OutputStream

If you want to have an output stream instead of write you can just new PortOutputStream(commPort) and you can have an output stream.


Constructor Summary
PortOutputStream(CommPort commPort)
           
 
Method Summary
 void flush()
           
 void write(byte[] buff)
           
 void write(byte[] buff, int offset, int len)
           
 void write(int val)
           
 
Methods inherited from class java.io.OutputStream
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortOutputStream

public PortOutputStream(CommPort commPort)
Method Detail

write

public void write(int val)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte[] buff)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte[] buff,
                  int offset,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException