|
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.io.BaseConnection
|
+--com.dctl.j2me.io.datagram.Connection
The datagram connection class that supports IP datagrams
| Field Summary |
| Fields inherited from class com.dctl.j2me.io.BaseConnection |
protocol |
| Constructor Summary | |
Connection()
|
|
| Method Summary | |
void |
close()
Close the socket |
int |
getMaximumLength()
Cet the maximum length datagram we can send |
int |
getNominalLength()
Get the nominal length datagram to send |
Datagram |
newDatagram(byte[] buf,
int len)
Create a new datagram to be used on this connection |
Datagram |
newDatagram(byte[] buf,
int len,
java.lang.String addr)
Create a new datagram to be used on this connection |
Datagram |
newDatagram(int len)
Create a new datagram to be used on this connection |
Datagram |
newDatagram(int len,
java.lang.String addr)
Create a new datagram to be used on this connection |
void |
receive(Datagram dgram)
Receive a datagram on the connection |
void |
send(Datagram dgram)
Send a datagram on the connection to the requested address/port |
void |
setParameters(java.lang.String url,
int mode,
boolean timeouts)
Set the URL, mode and timeouts |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Connection()
| Method Detail |
public void setParameters(java.lang.String url,
int mode,
boolean timeouts)
throws IOException
setParameters in class BaseConnectionurl - The URL passed to connector.openmode - The mode passed to connector.open or DEFAULTtimeouts - true if timeout exceptions should occur
IOException - if there is a problempublic int getMaximumLength()
getMaximumLength in interface DatagramConnectionpublic int getNominalLength()
getNominalLength in interface DatagramConnection
public Datagram newDatagram(byte[] buf,
int len)
throws IOException
newDatagram in interface DatagramConnectionbuf - The buffer to uselen - the length of buffer to use for the datagram
IOException - if there is an error
IllegalArgumentException - if the buffer/length is invalid
public Datagram newDatagram(byte[] buf,
int len,
java.lang.String addr)
throws IOException
newDatagram in interface DatagramConnectionbuf - The buffer to uselen - The length of the buffer to use for the datagramaddr - The address of the other side
IOException - if there is an error
IllegalArgumentException - if the buffer/length is invalid
public Datagram newDatagram(int len)
throws IOException
newDatagram in interface DatagramConnectionlen - the length of buffer to use for the datagram
IOException - if there is an error
IllegalArgumentException - if the length is invalid
public Datagram newDatagram(int len,
java.lang.String addr)
throws IOException
newDatagram in interface DatagramConnectionlen - The length of the buffer to use for the datagramaddr - The address of the other side
IOException - if there is an error
IllegalArgumentException - if the length is invalid
public void receive(Datagram dgram)
throws IOException
receive in interface DatagramConnectiondgram - The datagram to use to receive data
IOException - if there is an error
public void send(Datagram dgram)
throws IOException
send in interface DatagramConnectiondgram - The datagram to send
IOException - if there is an error
public void close()
throws IOException
close in interface ConnectionIOException - 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 | ||||||||||