serial

## Class Serial.Builder

- java.lang.Object
- - serial.Serial.Builder

Enclosing class:
  Serial

    public static class Serial.Builder
    extends java.lang.Object

Builder for `Serial`.

### Constructor Summary

Constructors
Constructor and Description
`Serial.Builder()` Initial a `Serial.Builder` for serial port.
`Serial.Builder(java.lang.String port)` Initial a `Serial.Builder` for serial port.
`Serial.Builder(java.lang.String port, int baudrate)` Initial a `Serial.Builder` for serial port.

### Method Summary

Methods
`Serial` `create()` Create the serial object with give parameters.
`Serial.Builder` `setBaudrate(int baudrate)`
`Serial.Builder` `setBytesize(ByteSize bytesize)`
`Serial.Builder` `setFlowcontrol(FlowControl flowcontrol)`
`Serial.Builder` `setParity(Parity parity)`
`Serial.Builder` `setPort(java.lang.String port)`
`Serial.Builder` `setStopbits(Stopbits stopbits)`
`Serial.Builder` `setTimeout(Timeout timeout)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Serial.Builder

    public Serial.Builder()

Initial a `Serial.Builder` for serial port.

#### Serial.Builder

    public Serial.Builder(java.lang.String port)

Initial a `Serial.Builder` for serial port.

Parameters:
  `port` - the path of the serial port.

#### Serial.Builder

    public Serial.Builder(java.lang.String port,
                  int baudrate)

Initial a `Serial.Builder` for serial port.

Parameters:
  `port` - the path of the serial port.
  `baudrate` - the baudrate to use.

### Method Detail

#### setPort

    public Serial.Builder setPort(java.lang.String port)

See Also:
  `Serial.setPort(String)`

#### setBaudrate

    public Serial.Builder setBaudrate(int baudrate)

See Also:
  `Serial.setBaudrate(int)`

#### setTimeout

    public Serial.Builder setTimeout(Timeout timeout)

See Also:
  `Serial.setTimeout(Timeout)`

#### setBytesize

    public Serial.Builder setBytesize(ByteSize bytesize)

See Also:
  `Serial.setBytesize(ByteSize)`

#### setParity

    public Serial.Builder setParity(Parity parity)

See Also:
  `Serial.setParity(Parity)`

#### setStopbits

    public Serial.Builder setStopbits(Stopbits stopbits)

See Also:
  `Serial.setStopbits(Stopbits)`

#### setFlowcontrol

    public Serial.Builder setFlowcontrol(FlowControl flowcontrol)

See Also:
  `Serial.setFlowcontrol(FlowControl)`

#### create

    public Serial create()
                  throws SerialIOException

Create the serial object with give parameters.

Returns:
  an instance of `Serial`.
Throws:
  `SerialIOException` - I/O error.