public interface ObexTransport
ObexTransport
interface defines the underlying transport
connection which carries the OBEX protocol( such as TCP, RFCOMM device file
exposed by Bluetooth or USB in kernel, RFCOMM socket emulated in Android
platform, Irda). This interface provides an abstract layer to be used by the
ObexConnection
. Each kind of medium shall have its own
implementation to wrap and follow the same interface.
See section 1.2.2 of IrDA Object Exchange Protocol specification.
Different kind of medium may have different construction - for example, the RFCOMM device file medium may be constructed from a file descriptor or simply a string while the TCP medium usually from a socket.
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
connect() |
void |
create() |
void |
disconnect() |
int |
getMaxReceivePacketSize()
Must return the maximum allowed OBEX packet that can be received over
the transport.
|
int |
getMaxTransmitPacketSize()
Must return the maximum allowed OBEX packet that can be sent over
the transport.
|
boolean |
isSrmSupported()
Shall return true if the transport in use supports SRM.
|
void |
listen() |
DataInputStream |
openDataInputStream() |
DataOutputStream |
openDataOutputStream() |
InputStream |
openInputStream() |
OutputStream |
openOutputStream() |
void create() throws IOException
IOException
void listen() throws IOException
IOException
void close() throws IOException
IOException
void connect() throws IOException
IOException
void disconnect() throws IOException
IOException
InputStream openInputStream() throws IOException
IOException
OutputStream openOutputStream() throws IOException
IOException
DataInputStream openDataInputStream() throws IOException
IOException
DataOutputStream openDataOutputStream() throws IOException
IOException
int getMaxTransmitPacketSize()
int getMaxReceivePacketSize()
boolean isSrmSupported()
true
if SRM operation is supported, and is to be enabled.
false
if SRM operations are not supported, or should not be used.