Interface BluetoothSocket


  • public interface BluetoothSocket
    A Bluetooth socket provides a way to communicate with a 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.