Java(tm) Communications API

API Changes between EA3 and Beta 1



 

API Additions

1) CommPort now has a toString() method


 

API Changes

Name Changes:

  1. getBaudrate() is now getBaudRate()

  2. getFlowcontrolMode() is now getFlowControlMode()
    setFlowcontrolMode is now setFlowControlMode()

  3. Converted all methods with Rcv in the name to Receive . i.e, in CommPort

  4. openPort() is now open()
    closePort is now close().

  5. FLOWCTRL has been changed to FLOWCONTROL. i.e, in SerialPort

  6. DATA_AVAIL is now DATA_AVAILABLE in SerialPortEvent class.

  7. OUTBUF_EMPTY is now OUTPUT_BUFFER_EMPTY in SerialPortEvent.


Exception Throwing:

  1. setFlowControlMode() throws an UnsupportedCommOperationException for unsupported modes.

  2. SerialPort.addEventListener() and ParallelPort.addEventListener() throw a java.util.TooManyListenersException() if a second listener is attempted to be added.

  3. CommPort's enableReceiveTimeout(), enableReceiveThreshold(), and enableReceiveFraming() methods throw an UnsupportedCommOperationException if that particular operation is not supported by the driver.

  4. ParallelPort.setMode() throws an UnsupportedCommOperationException if the mode is not supported by the driver.

Copyright © 1998 Sun Microsystems, Inc.
All Rights Reserved.