inBuf is greater than or equal to ReceiveMTU, then no data will be lost. Unlike read() on an java.io.InputStream, if the size of inBuf is smaller than ReceiveMTU, then the portion of the L2CAP payload that will fit into inBuf will be placed in inBuf, the rest will be discarded. If the application is aware of the number of bytes (less than ReceiveMTU) it will receive in any transaction, then the size of inBuf can be less than ReceiveMTU and no data will be lost. If inBuf is of length 0, all data sent in one packet is lost unless the length of the packet is 0.
@param inBuf byte array to store the received data
@return the actual number of bytes read; 0 if a zero length packet is received; 0 if inBuf length is zero
@exception IOException if an I/O error occurs or the connection has been closed
@exception InterruptedIOException if the request timed out
@exception NullPointerException if inBuf is null
| |
| |
| |