com.citizen.port.android
Class BluetoothPort

java.lang.Object
  extended by com.citizen.port.android.BluetoothPort
All Implemented Interfaces:
PortInterface

public class BluetoothPort
extends java.lang.Object
implements PortInterface

Bluetooth Port. CITIZEN

Since:
1.061

Constructor Summary
BluetoothPort()
           
 
Method Summary
 void connect(android.bluetooth.BluetoothDevice device)
          Connect the interface to the destination address.
 void connect(java.lang.String address)
          Bluetooth Address.
 void connectSecure(android.bluetooth.BluetoothDevice device)
           
 void connectSecure(java.lang.String address)
           
 void disconnect()
          Disconnect the current connection.
 java.io.InputStream getInputStream()
          Get a InputStream.
static BluetoothPort getInstance()
          no deprecated Get a instance of Bluetooth class.
 java.io.OutputStream getOutputStream()
          Get a OutputStream.
 boolean isConnected()
          Get a status that the interface were connected.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BluetoothPort

public BluetoothPort()
Method Detail

getInstance

public static BluetoothPort getInstance()
no deprecated Get a instance of Bluetooth class.

Returns:
BluetoothPort

connect

public void connect(java.lang.String address)
             throws java.io.IOException
Bluetooth Address.

Specified by:
connect in interface PortInterface
Parameters:
address -
Throws:
java.io.IOException

connect

public void connect(android.bluetooth.BluetoothDevice device)
             throws java.io.IOException
Connect the interface to the destination address.

Parameters:
device - BluetoothDevice
Throws:
java.io.IOException

connectSecure

public void connectSecure(java.lang.String address)
                   throws java.io.IOException
Parameters:
address -
Throws:
java.io.IOException

connectSecure

public void connectSecure(android.bluetooth.BluetoothDevice device)
                   throws java.io.IOException
Parameters:
device -
Throws:
java.io.IOException

disconnect

public void disconnect()
                throws java.io.IOException,
                       java.lang.InterruptedException
Description copied from interface: PortInterface
Disconnect the current connection.

Specified by:
disconnect in interface PortInterface
Throws:
java.io.IOException
java.lang.InterruptedException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from interface: PortInterface
Get a InputStream.

Specified by:
getInputStream in interface PortInterface
Returns:
InputStream, null (if not connected.)
Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Description copied from interface: PortInterface
Get a OutputStream.

Specified by:
getOutputStream in interface PortInterface
Returns:
OutputStream, null (if not connected.)
Throws:
java.io.IOException

isConnected

public boolean isConnected()
Description copied from interface: PortInterface
Get a status that the interface were connected.

Specified by:
isConnected in interface PortInterface
Returns:
Interface whether connected or not.