|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.dctl.j2me.net.TCP
This wraps up all the TCP socket methods
| Constructor Summary | |
TCP()
|
|
| Method Summary | |
static int |
available(int handle)
Return the number of bytes available in the buffer |
static void |
close(int handle)
Close a socket |
static void |
connect(int handle,
int address,
int port)
Connect the socket to a server |
static int |
createSocket()
Create a new socket |
static void |
flush(int handle)
Flush the buffer |
static int |
read(int handle)
Return one byte of data from the stream |
static int |
read(int handle,
byte[] buf,
int off,
int len)
Read into a buffer from the stream |
static int |
skip(int handle,
int n)
Skip a number of bytes |
static void |
write(int handle,
byte[] buf,
int off,
int len)
Write a buffer to the stream |
static void |
write(int handle,
int b)
Write one byte to the socket |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TCP()
| Method Detail |
public static int createSocket()
throws IOException
IOException - if there is an error
public static void connect(int handle,
int address,
int port)
throws IOException
handle - The handleaddress - The address of the serverport - The port on the server to connect to
IOException - if there is an error
public static void close(int handle)
throws IOException
handle - The handle
IOException - if there is an error
public static int available(int handle)
throws IOException
handle - The handle
IOException - if there is an error
public static int read(int handle)
throws IOException
handle - The handle
IOException - if there is an error
public static int read(int handle,
byte[] buf,
int off,
int len)
throws IOException
handle - The handlebuf - The bufferoff - The offset into the bufferlen - The maximum length to read
IOException - if there is an error
public static int skip(int handle,
int n)
throws IOException
handle - The handlen - The number of bytes to skip
IOException - if there is an error
public static void write(int handle,
int b)
throws IOException
handle - The handleb - The byte to write
IOException - if there is an error
public static void write(int handle,
byte[] buf,
int off,
int len)
throws IOException
handle - The handlebuf - The bufferoff - The offset into the bufferlen - The maximum length to write
IOException - if there is an error
public static void flush(int handle)
throws IOException
handle - The handle
IOException - if there is an error
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||