Package eu.woolplatform.utils.bluetooth
Interface BluetoothSocket
-
public interface BluetoothSocketA Bluetooth socket provides a way to communicate with a remote Bluetooth device.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the connection with the remote device.InputStreamgetInputStream()Returns the input stream to read data from the remote device.OutputStreamgetOutputStream()Returns the output stream to write data to the remote device.StringgetRemoteAddress()Returns the address of the remote Bluetooth device.
-
-
-
Method Detail
-
getRemoteAddress
String getRemoteAddress()
Returns the address of the remote Bluetooth device. The address is returned in the format 00:00:00:00:00:00. That is 12 hexadecimal characters in groups of two.- Returns:
- the address of the remote Bluetooth device
-
getInputStream
InputStream getInputStream() throws IOException
Returns the input stream to read data from the remote device.- Returns:
- the input stream
- Throws:
IOException- if the input stream can't be opened
-
getOutputStream
OutputStream getOutputStream() throws IOException
Returns the output stream to write data to the remote device.- Returns:
- the output stream
- Throws:
IOException- if the output stream can't be opened
-
close
void close()
Closes the connection with the remote device.
-
-