Class portio.Port
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class portio.Port

java.lang.Object
   |
   +----portio.Port

public class Port
extends Object
This is a superclass for SerialPort and ParallelPort (and any other future port types).
Version:
$Revision: 2.1 $ ($Date: 1997/02/19 18:00:00 $)
See Also:
SerialPort, ParallelPort

Method Index

 o close()
Disables the port and makes it available for someone else to use.
 o getInputStream()
Returns an input stream for the port.
 o getOutputStream()
Returns an output stream for the port.
 o getStatus(boolean)
Gets the state of the port.
 o purge(boolean, boolean)
Dumps any buffered data on the input or output streams of the port.

Methods

 o close
  public void close() throws PortIOException
Disables the port and makes it available for someone else to use.
 o getInputStream
  public InputStream getInputStream()
Returns an input stream for the port.
 o getOutputStream
  public OutputStream getOutputStream()
Returns an output stream for the port.
 o purge
  public void purge(boolean write,
                    boolean read) throws PortIOException
Dumps any buffered data on the input or output streams of the port.
Parameters:
write - if true, dumps any buffered outgoing data
read - if true, dumps any buffered incoming data
 o getStatus
  public PortStatus getStatus(boolean wait) throws PortIOException
Gets the state of the port. Will actually return SerialPortStatus or ParallelPortStatus object. Serial status is modem signals RTS, CTS, DSR, DCD, and DTR. Parallel status is SEL, ERR, and PE.
Parameters:
wait - when true, waits until status changes from last returned value
Throws: PortIOException
if a problem occurs
See Also:
SerialPortStatus, ParallelPortStatus

All Packages  Class Hierarchy  This Package  Previous  Next  Index