Package ej.bluetooth

## Class BluetoothCharacteristic

- java.lang.Object
- - ej.bluetooth.BluetoothAttribute
  - - ej.bluetooth.BluetoothCharacteristic

-     public class BluetoothCharacteristic
      extends BluetoothAttribute

  The `BluetoothCharacteristic` class represents a remote or a local GATT characteristic.

  Remote characteristics may be retrieved by `getting the characteristics` of a remote service.

  Local characteristics may be retrieved by `adding a local service` to the adapter.

  This class provides methods to get the properties of the characteristic and to get its descriptors.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BluetoothCharacteristic()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `BluetoothDescriptor` | `getDescriptor​(int index)` | Returns the descriptor at the given index in this characteristic.
    `int` | `getNumDescriptors()` | Returns the number of descriptors in this characteristic.
    `byte` | `getProperties()` | Returns the properties of this characteristic.

    - ### Methods inherited from class ej.bluetooth.BluetoothAttribute

      `getService, getUuid`

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

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

- - ### Constructor Detail

    - #### BluetoothCharacteristic

          public BluetoothCharacteristic()

  - ### Method Detail

    - #### getProperties

          public byte getProperties()

      Returns the properties of this characteristic.
      Returns:
        the properties of this characteristic (see `BluetoothProperties`).

    - #### getNumDescriptors

          public int getNumDescriptors()

      Returns the number of descriptors in this characteristic.
      Returns:
        the number of descriptors in this characteristic.

    - #### getDescriptor

          public BluetoothDescriptor getDescriptor​(int index)

      Returns the descriptor at the given index in this characteristic.
      Parameters:
        `index` - the index of the descriptor.
      Returns:
        the descriptor at the given index.
      Throws:
        `IndexOutOfBoundsException` - if the index is out of range (`index < 0 || index >= getNumDescriptors()`).