|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.squawk.io.ConnectionBase com.sun.squawk.io.j2me.socket.Protocol
public class Protocol
Support for socket connections on device. This allows a generic stream connection with an external host (on a TCP network). This must be used in conjunction with a SocketProxy on a host computer.
Constructor Summary | |
---|---|
Protocol()
|
Method Summary | |
---|---|
void |
close()
Close the connection. |
Connection |
open(String protocol,
String name,
int mode,
boolean timeouts)
Open the connection |
InputStream |
openInputStream()
Returns an input stream for this socket. |
OutputStream |
openOutputStream()
Returns an output stream for this socket. |
Methods inherited from class com.sun.squawk.io.ConnectionBase |
---|
openDataInputStream, openDataOutputStream |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.microedition.io.InputConnection |
---|
openDataInputStream |
Methods inherited from interface javax.microedition.io.OutputConnection |
---|
openDataOutputStream |
Constructor Detail |
---|
public Protocol()
Method Detail |
---|
public Connection open(String protocol, String name, int mode, boolean timeouts) throws IOException
open
in class ConnectionBase
name
- protocol
- The URL protocolmode
- The access modetimeouts
- A flag to indicate that the caller
wants timeout exceptions
IOException
public InputStream openInputStream() throws IOException
openInputStream
in interface InputConnection
openInputStream
in class ConnectionBase
IOException
- if an I/O error occurs when creating the input stream.public OutputStream openOutputStream() throws IOException
openOutputStream
in interface OutputConnection
openOutputStream
in class ConnectionBase
IOException
- if an I/O error occurs when creating the
output stream.public void close() throws IOException
close
in interface Connection
close
in class ConnectionBase
IOException
- if an I/O error occurs when closing the
connection.
|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |