|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface for a connection which uses Datagrams to send and receive data
| Method Summary | |
int |
getMaximumLength()
Get the maximum length a datagram can be. |
int |
getNominalLength()
Get the nominal length of a datagram. |
Datagram |
newDatagram(byte[] buf,
int size)
Make a new datagram object. |
Datagram |
newDatagram(byte[] buf,
int size,
java.lang.String addr)
Make a new datagram object. |
Datagram |
newDatagram(int size)
Make a new datagram object automatically allocating a buffer. |
Datagram |
newDatagram(int size,
java.lang.String addr)
Make a new datagram object. |
void |
receive(Datagram dgram)
Receive a datagram. |
void |
send(Datagram dgram)
Send a datagram. |
| Methods inherited from interface javax.microedition.io.Connection |
close |
| Method Detail |
public int getMaximumLength()
throws IOException
IOException - If an I/O error occurs.
public int getNominalLength()
throws IOException
IOException - If an I/O error occurs.
public void send(Datagram dgram)
throws IOException
dgram - A datagram.
IOException - If an I/O error occurs.
InterruptedIOException - Timeout or upon closing the
connection with outstanding I/O.
public void receive(Datagram dgram)
throws IOException
dgram - A datagram.
IOException - If an I/O error occurs.
InterruptedIOException - Timeout or upon closing the
connection with outstanding I/O.
public Datagram newDatagram(int size)
throws IOException
size - The length of the buffer to be allocated
for the datagram
IOException - If an I/O error occurs.
IllegalArgumentException - if the length is negative
or larger than the buffer
public Datagram newDatagram(int size,
java.lang.String addr)
throws IOException
size - The length of the buffer to be usedaddr - The I/O address to which the datagram
will be sent
IOException - If an I/O error occurs.
IllegalArgumentException - if the length is negative or
larger than the buffer, or if the address
parameter is invalid
public Datagram newDatagram(byte[] buf,
int size)
throws IOException
buf - The buffer to be used in the datagramsize - The length of the buffer to be allocated
for the datagram
IOException - If an I/O error occurs.
IllegalArgumentException - if the length is negative or
larger than the buffer, or if the buffer
parameter is invalid
public Datagram newDatagram(byte[] buf,
int size,
java.lang.String addr)
throws IOException
buf - The buffer to be used in the datagramsize - The length of the buffer to be usedaddr - The I/O address to which the datagram
will be sent
IOException - If an I/O error occurs.
IllegalArgumentException - if the length is negative or
larger than the buffer, or if the address
or buffer parameters is invalid
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||