com.engidea.comm
Class PortOutputStream
java.lang.Object
java.io.OutputStream
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.
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 |
PortOutputStream
public PortOutputStream(CommPort commPort)
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