Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.bluetooth
Class RemoteDevice

    java.lang.Object
      javax.bluetooth.RemoteDevice

    public class RemoteDevice

extends Object

Represents a remote Bluetooth device.

Author:
  Lawrie Griffiths

Constructor Summary
`protected` | `RemoteDevice(byte[] addr)` Note: The standard JSR 82 method for obtaining a RemoteDevice uses a String rather than byte[].
`` | `RemoteDevice(char[] friendlyNameCharArray, int len, byte[] deviceAddr, byte[] devclass)`

Method Summary
`boolean` | `equals(Object obj)` Determines if two RemoteDevices are equal.
`String` | `getBluetoothAddress()`
`byte[]` | `getDeviceAddr()`
`byte[]` | `getDeviceClass()`
`String` | `getFriendlyName(boolean alwaysAsk)`
`int` | `getFriendlyName(char[] friendlyNameCharArray)`
`static RemoteDevice` | `getRemoteDevice(Connection conn)`
`void` | `setDeviceAddr(byte[] deviceAddr)`
`void` | `setDeviceClass(byte[] devclass)`
`void` | `setFriendlyName(char[] friendlyNameCharArray, int len)`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, toString, wait, wait`

Constructor Detail

### RemoteDevice

    protected RemoteDevice(byte[] addr)

  Note: The standard JSR 82 method for obtaining a RemoteDevice uses a String rather than byte[]. Protected so shouldn't matter.

  Parameters:
    `addr` -

### RemoteDevice

    public RemoteDevice(char[] friendlyNameCharArray,
                        int len,
                        byte[] deviceAddr,
                        byte[] devclass)

Method Detail

### getRemoteDevice

    public static RemoteDevice getRemoteDevice(Connection conn)
                                        throws IOException

  Throws:
    `IOException`

### setDeviceAddr

    public void setDeviceAddr(byte[] deviceAddr)

### getDeviceAddr

    public byte[] getDeviceAddr()

### setFriendlyName

    public void setFriendlyName(char[] friendlyNameCharArray,
                                int len)

### getFriendlyName

    public String getFriendlyName(boolean alwaysAsk)

  Parameters:
    `alwaysAsk` - true causes the method to contact the remote device for the name. false and it will use the known name.
  Returns:
    the friendly name

### getFriendlyName

    public int getFriendlyName(char[] friendlyNameCharArray)

### setDeviceClass

    public void setDeviceClass(byte[] devclass)

### getBluetoothAddress

    public String getBluetoothAddress()

### equals

    public boolean equals(Object obj)

  Determines if two RemoteDevices are equal. If they both have the same BT address then they are considered equal.

  Overrides:
    `equals` in class `Object`

### getDeviceClass

    public byte[] getDeviceClass()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD