com.intel.bluetooth.gcf.socket
Class SocketConnection
java.lang.Object
com.intel.bluetooth.gcf.socket.SocketConnection
- All Implemented Interfaces:
- Connection, InputConnection, OutputConnection, SocketConnection, StreamConnection
public class SocketConnection
- extends Object
- implements SocketConnection
- Rating

Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
socket
protected Socket socket
SocketConnection
public SocketConnection()
SocketConnection
public SocketConnection(String host,
int port)
throws IOException
- Throws:
IOException
SocketConnection
public SocketConnection(Socket socket)
getAddress
public String getAddress()
throws IOException
- Specified by:
getAddress
in interface SocketConnection
- Throws:
IOException
getLocalAddress
public String getLocalAddress()
throws IOException
- Specified by:
getLocalAddress
in interface SocketConnection
- Throws:
IOException
getLocalPort
public int getLocalPort()
throws IOException
- Specified by:
getLocalPort
in interface SocketConnection
- Throws:
IOException
getPort
public int getPort()
throws IOException
- Specified by:
getPort
in interface SocketConnection
- Throws:
IOException
getSocketOption
public int getSocketOption(byte option)
throws IllegalArgumentException,
IOException
- Specified by:
getSocketOption
in interface SocketConnection
- Throws:
IllegalArgumentException
IOException
setSocketOption
public void setSocketOption(byte option,
int value)
throws IllegalArgumentException,
IOException
- Specified by:
setSocketOption
in interface SocketConnection
- Throws:
IllegalArgumentException
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Connection
- Throws:
IOException
openInputStream
public InputStream openInputStream()
throws IOException
- Description copied from interface:
InputConnection
- Open and return an input stream for a connection.
- Specified by:
openInputStream
in interface InputConnection
- Returns:
- An input stream
- Throws:
IOException
- If an I/O error occur
openDataInputStream
public DataInputStream openDataInputStream()
throws IOException
- Description copied from interface:
InputConnection
- Open and return a data input stream for a connection.
- Specified by:
openDataInputStream
in interface InputConnection
- Returns:
- An input stream
- Throws:
IOException
- If an I/O error occur
openOutputStream
public OutputStream openOutputStream()
throws IOException
- Description copied from interface:
OutputConnection
- Open and return an output stream for a connection.
- Specified by:
openOutputStream
in interface OutputConnection
- Returns:
- An output stream
- Throws:
IOException
- If an I/O error occur
openDataOutputStream
public DataOutputStream openDataOutputStream()
throws IOException
- Description copied from interface:
OutputConnection
- Open and return a data output stream for a connection.
- Specified by:
openDataOutputStream
in interface OutputConnection
- Returns:
- An output stream
- Throws:
IOException
- If an I/O error occur