FileDocCategorySizeDatePackage
ObexTransport.javaAPI DocphoneME MR2 API (J2ME)2988Wed May 02 18:00:32 BST 2007com.sun.kvem.jsr082.obex

ObexTransport

public interface ObexTransport implements javax.microedition.io.Connection

Fields Summary
Constructors Summary
Methods Summary
public intgetMaximumPacketSize()
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.

return
the maximum number of bytes that can be sent/received in a single call to read()/ write() without losing any data.

public javax.microedition.io.ConnectiongetUnderlyingConnection()
Get underlying connection.

public intread(byte[] inData)
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.

param
inData the data array to fill with received bytes.
exception
IOException if a local or remote connection is closed or I/O error has happen.
exception
NullPointerException if the specified buffer is null.

public voidwrite(byte[] outData, int len)

param
outData the buffer with the data to be sent.
param
len the number of bytes to be sent.
exception
IOException if a local or remote connection is closed or I/O error has happen.
exception
NullPointerException if the specified buffer is null.