| com.sun.kvem.jsr082.obex.ObexTransport
All known Subclasses: com.sun.midp.io.j2me.tcpobex.TCPOBEXConnection, com.sun.midp.io.j2me.btgoep.BTGOEPConnection, com.sun.midp.io.j2me.irdaobex.IrOBEXConnection,
Method Summary | |
public int | getMaximumPacketSize() Determines the amount of data (maximum packet size) that can
be successfully sent in a single write operation. | public Connection | getUnderlyingConnection() Get underlying connection. | public int | read(byte[] inData) Reads the packet data into specified buffer. | public void | write(byte[] outData, int len) |
getMaximumPacketSize | public int getMaximumPacketSize()(Code) | | Determines the amount of data (maximum packet size) that can
be successfully sent in a single write operation. If the size
of data is greater than the maximum packet size, then then only
the first maximum packet size bytes of the packet are sent,
and the rest will be discarded.
If the returned values is 0, this means the transport
implementation is based on a stream protocol, i.e.
any packet size may be used.
the maximum number of bytes that can be sent/receivedin a single call to read()/ write() without losing any data. |
getUnderlyingConnection | public Connection getUnderlyingConnection()(Code) | | Get underlying connection.
|
read | public int read(byte[] inData) throws IOException(Code) | | Reads the packet data into specified buffer.
If the specified buffer length is 0, then 0 data
will be read into this buffer, and the rest of packet
data is lost.
Parameters: inData - the data array to fill with received bytes. exception: IOException - if a local or remote connectionis closed or I/O error has happen. exception: NullPointerException - if the specified buffer is null. |
write | public void write(byte[] outData, int len) throws IOException(Code) | | Parameters: outData - the buffer with the data to be sent. Parameters: len - the number of bytes to be sent. exception: IOException - if a local or remote connectionis closed or I/O error has happen. exception: NullPointerException - if the specified buffer is null. |
|
|