API Changes

# 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
   `
   - disableRcvFraming() -> disableReceiveFraming()
   - disableRcvThreshold() -> disableReceiveThreshold()
   - disableRcvTimeout() -> disableReceiveTimeout()
   - enableRcvFraming() -> enableReceiveFraming()
   - enableRcvThreshold -> enableReceiveThreshold()
   - enableRcvTimeout() -> enableReceiveTimeout()
   - getRcvFramingByte() -> getReceiveFramingByte()
   - getRcvThreshold() -> getReceiveThreshold()
   - getRcvTimeout() -> getReceiveTimeout()
   - isRcvFramingEnabled() -> isReceiveFramingEnabled()
   - isRcvThresholdEnabled() -> isReceiveThresholdEnabled()
   - isRcvTimeoutEnabled() -> isReceiveTimeoutEnabled()
   `

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

5. `FLOWCTRL` has been changed to `FLOWCONTROL`. i.e, in SerialPort
   `
   - FLOWCTRL_NONE -> FLOWCONTROL_NONE
   - FLOWCTRL_RTSCTS_IN -> FLOWCONTROL_RTSCTS_IN
   - FLOWCTRL_RTSCTS_OUT -> FLOWCONTROL_RTS_CTS_OUT
   - FLOWCTRL_XONXOFF_IN -> FLOWCONTROL_XONXOFF_IN
   - FLOWCTRL_XONXOFF_OUT -> FLOWCONTROL_XONXOFF_OUT
   `

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.