com.sewoo.port.android
Class WiFiPort

java.lang.Object
  extended by com.sewoo.port.android.WiFiPort
All Implemented Interfaces:
PortInterface

public class WiFiPort
extends java.lang.Object
implements PortInterface

Wi-Fi interface.

Since:
1.04

Method Summary
 void connect(java.lang.String address)
          Connect the interface to the destination address.
 void connect(java.lang.String address, int port)
          Connect the interface to the destination address.
 void disconnect()
          Disconnect the current connection.
 java.io.InputStream getInputStream()
          Get a InputStream.
static WiFiPort getInstance()
          Get a instance of WiFiPort 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
 

Method Detail

getInstance

public static WiFiPort getInstance()
Get a instance of WiFiPort class.

Returns:
WiFiPort

connect

public void connect(java.lang.String address,
                    int port)
             throws java.io.IOException
Connect the interface to the destination address.

Parameters:
address - IP address.
port - Port Number.
Throws:
java.io.IOException

connect

public void connect(java.lang.String address)
             throws java.io.IOException
Description copied from interface: PortInterface
Connect the interface to the destination address.

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

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

disconnect

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

Specified by:
disconnect in interface PortInterface
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.