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(com.dalsemi.comm.InternalSerialPort sp)
          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 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
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerialOutputStream

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

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.
Parameters:
ch - the byte to send.
Throws:
java.io.IOException -  
Overrides:
write in class java.io.OutputStream
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.
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 -  
Overrides:
write in class java.io.OutputStream
See Also:

close

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


Используются технологии uCoz