com.dalsemi.comm
Class SerialOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--com.dalsemi.comm.SerialOutputStream

public class SerialOutputStream
extends java.io.OutputStream

An Serial output stream is an output stream for writing data to a serial port.


Constructor Summary
SerialOutputStream(int portnum)
          Creates a new data output stream to write data to the serial port.
 
Method Summary
 void close()
          Closes this output stream and releases any system resources associated with this stream.
 void flush()
          Flushes this output stream.
protected  void open()
          Opens a serial output stream for writing.
 void write(byte[] barr, int offset, int len)
          Sends the given array out the serial port.
 void write(int ch)
          Writes the given character to the serial port.
 
Methods inherited from class java.io.OutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerialOutputStream

public SerialOutputStream(int portnum)
Creates a new data output stream to write data to the serial port.
Parameters:
sp - the serial port to use for communications.
Method Detail

open

protected void open()
             throws java.io.IOException
Opens a serial output stream for writing.
Throws:
java.io.IOException - if an I/O error occurs.

write

public void write(int ch)
           throws java.io.IOException
Writes the given character to the serial port. This method blocks until the byte has actually be sent.
Overrides:
write in class java.io.OutputStream
Parameters:
ch - the byte to send.
Throws:
java.io.IOException -  
See Also:

write

public void write(byte[] barr,
                  int offset,
                  int len)
           throws java.io.IOException
Sends the given array out the serial port. This method blocks until all bytes have been sent.
Overrides:
write in class java.io.OutputStream
Parameters:
barr - the array to send.
offset - the offset into the array to begin sending.
len - the number of bytes to send.
Throws:
java.io.IOException -  
See Also:

close

public void close()
           throws java.io.IOException
Closes this output stream and releases any system resources associated with this stream.
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException - if an I/O error occurs.

flush

public void flush()
           throws java.io.IOException
Flushes this output stream.
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException - if an I/O error occurs.


Also see:
o TINI 1.11 API, Optional Modules
o TINI Home Page
o 1-Wire API

Last update Fri Jan 24 12:06:43 CST 2003
Используются технологии uCoz