comm
Class CommPort
java.lang.Object
   comm.CommPort
comm.CommPort
- All Implemented Interfaces: 
- CommPortInterface
- Direct Known Subclasses: 
- ParallelPort, SerialPort
- public abstract class CommPort 
- extends java.lang.Object- implements CommPortInterface
This class models a communications port.
 
 The application should use
 CommPortIdentifier.getPortIdentifiers to retrieve a list of
 available port identifiers. It should then call
 CommPortIdentifier.open to retrieve the corresponding
 CommPort object. When it has finished with the port, it should call
 close to release any underlying resources.
- Version:
- 2.0.3
- Author:
- Chris Burdess
 
| Method Summary | 
|  void | close()Closes this communications port.
 | 
|  java.lang.String | getName()Gets the name of the communications port.
 | 
|  java.lang.String | toString()
 | 
 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
| Methods inherited from interface comm.CommPortInterface | 
| disableReceiveFraming, disableReceiveThreshold, disableReceiveTimeout, enableReceiveFraming, enableReceiveThreshold, enableReceiveTimeout, getInputBufferSize, getInputStream, getOutputBufferSize, getOutputStream, getReceiveFramingByte, getReceiveThreshold, getReceiveTimeout, isReceiveFramingEnabled, isReceiveThresholdEnabled, isReceiveTimeoutEnabled, setInputBufferSize, setOutputBufferSize | 
 
CommPort
public CommPort()
getName
public java.lang.String getName()
- Description copied from interface: CommPortInterface
- Gets the name of the communications port. This name should correspond to
 something the user can identify, like the label on the hardware.
 
- 
- Specified by:
- getNamein interface- CommPortInterface
 
- 
- Returns:
- name of the port
 
toString
public java.lang.String toString()
- 
- Specified by:
- toStringin interface- CommPortInterface
- Overrides:
- toStringin class- java.lang.Object
 
- 
- Returns:
- a string representation of this port.
 
close
public void close()
- Description copied from interface: CommPortInterface
- Closes this communications port.
 All PortOwnershipListeners will be 
 notified of this change of ownership. Further method calls on this 
 object will throw IllegalStateException. Further calls on the 
 associated InputStream or OutputStream will throw IOException.
 
 Close does not block. Undelivered data is discarded. Blocked read and 
 write operations are aborted if the underlying operating systems 
 supports an IO abort mechanism. To await the delivery of undelivered 
 data call OutputStream.flush() or OutputStream.close() before calling 
 Port.close().
 
- 
- Specified by:
- closein interface- CommPortInterface
 
-