ist.palcom.base
Class BluetoothSocket
java.lang.Object
ist.palcom.base.BluetoothSocket
- All Implemented Interfaces:
- Channel
public class BluetoothSocket
- extends Object
- implements Channel
This class implements a JVM and Avetana version of core.BluetoothSocket.
Notes: Since the implementation is based on rfcomm, the api only allows one
connection to each host.
localDevice
protected LocalDevice localDevice
BluetoothSocket
public BluetoothSocket(String BTURL)
BluetoothSocket
public BluetoothSocket()
send
public void send(BluetoothPacket p)
receive
public boolean receive(BluetoothPacket packet)
close
public void close()
dataAvailable
public boolean dataAvailable()
- After a call to System's select or selectNow with this BluetoothSocket,
returns true if data is available, false otherwise. If no call to select
or selctNow has been made, result is undefined.
- Specified by:
dataAvailable in interface Channel
startReceiving
public void startReceiving()
isConnected
public boolean isConnected()
getURL
public String getURL()
getDeviceAddress
public String getDeviceAddress()
getLocalAddress
public static String getLocalAddress()
- Returns:
- The local host address (without port).
- Throws:
Exception