|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 ConnectionBasename - 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 InputConnectionopenInputStream in class ConnectionBaseIOException - if an I/O error occurs when creating the input stream.
public OutputStream openOutputStream()
throws IOException
openOutputStream in interface OutputConnectionopenOutputStream in class ConnectionBaseIOException - if an I/O error occurs when creating the
output stream.
public void close()
throws IOException
close in interface Connectionclose in class ConnectionBaseIOException - if an I/O error occurs when closing the
connection.
|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||