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)
|
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)
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()