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
-
close()
- Disables the port and makes it available for someone else to use.
-
getInputStream()
- Returns an input stream for the port.
-
getOutputStream()
- Returns an output stream for the port.
-
getStatus(boolean)
- Gets the state of the port.
-
purge(boolean, boolean)
- Dumps any buffered data on the input or output streams of the port.
close
public void close() throws PortIOException
- Disables the port and makes it available for someone else to use.
getInputStream
public InputStream getInputStream()
- Returns an input stream for the port.
getOutputStream
public OutputStream getOutputStream()
- Returns an output stream for the port.
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
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