org.microemu.cldc.socket
Class SocketConnection

java.lang.Object
  extended by org.microemu.cldc.socket.SocketConnection
All Implemented Interfaces:
javax.microedition.io.Connection, javax.microedition.io.InputConnection, javax.microedition.io.OutputConnection, javax.microedition.io.SocketConnection, javax.microedition.io.StreamConnection
Direct Known Subclasses:
Connection

public class SocketConnection
extends java.lang.Object
implements javax.microedition.io.SocketConnection


Field Summary
protected  java.net.Socket socket
           
 
Fields inherited from interface javax.microedition.io.SocketConnection
DELAY, KEEPALIVE, LINGER, RCVBUF, SNDBUF
 
Constructor Summary
SocketConnection()
           
SocketConnection(java.net.Socket socket)
           
SocketConnection(java.lang.String host, int port)
           
 
Method Summary
 void close()
           
 java.lang.String getAddress()
           
 java.lang.String getLocalAddress()
           
 int getLocalPort()
           
 int getPort()
           
 int getSocketOption(byte option)
           
 java.io.DataInputStream openDataInputStream()
           
 java.io.DataOutputStream openDataOutputStream()
           
 java.io.InputStream openInputStream()
           
 java.io.OutputStream openOutputStream()
           
 void setSocketOption(byte option, int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

socket

protected java.net.Socket socket
Constructor Detail

SocketConnection

public SocketConnection()

SocketConnection

public SocketConnection(java.lang.String host,
                        int port)
                 throws java.io.IOException
Throws:
java.io.IOException

SocketConnection

public SocketConnection(java.net.Socket socket)
Method Detail

getAddress

public java.lang.String getAddress()
                            throws java.io.IOException
Specified by:
getAddress in interface javax.microedition.io.SocketConnection
Throws:
java.io.IOException

getLocalAddress

public java.lang.String getLocalAddress()
                                 throws java.io.IOException
Specified by:
getLocalAddress in interface javax.microedition.io.SocketConnection
Throws:
java.io.IOException

getLocalPort

public int getLocalPort()
                 throws java.io.IOException
Specified by:
getLocalPort in interface javax.microedition.io.SocketConnection
Throws:
java.io.IOException

getPort

public int getPort()
            throws java.io.IOException
Specified by:
getPort in interface javax.microedition.io.SocketConnection
Throws:
java.io.IOException

getSocketOption

public int getSocketOption(byte option)
                    throws java.lang.IllegalArgumentException,
                           java.io.IOException
Specified by:
getSocketOption in interface javax.microedition.io.SocketConnection
Throws:
java.lang.IllegalArgumentException
java.io.IOException

setSocketOption

public void setSocketOption(byte option,
                            int value)
                     throws java.lang.IllegalArgumentException,
                            java.io.IOException
Specified by:
setSocketOption in interface javax.microedition.io.SocketConnection
Throws:
java.lang.IllegalArgumentException
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface javax.microedition.io.Connection
Throws:
java.io.IOException

openInputStream

public java.io.InputStream openInputStream()
                                    throws java.io.IOException
Specified by:
openInputStream in interface javax.microedition.io.InputConnection
Throws:
java.io.IOException

openDataInputStream

public java.io.DataInputStream openDataInputStream()
                                            throws java.io.IOException
Specified by:
openDataInputStream in interface javax.microedition.io.InputConnection
Throws:
java.io.IOException

openOutputStream

public java.io.OutputStream openOutputStream()
                                      throws java.io.IOException
Specified by:
openOutputStream in interface javax.microedition.io.OutputConnection
Throws:
java.io.IOException

openDataOutputStream

public java.io.DataOutputStream openDataOutputStream()
                                              throws java.io.IOException
Specified by:
openDataOutputStream in interface javax.microedition.io.OutputConnection
Throws:
java.io.IOException


Copyright © 2001-2008 MicroEmulator Team. All Rights Reserved.