javax.microedition.io

MIDP 2.1 compliant S60 devices support the javax.microedition.io classes completely as defined in the MIDP 2.1 JSR. The following sections list additional implementation information for this package.

IO interfaces

Interface

Networking protocol used for S60

Notes

CommConnection

Physical RS-232 serial port or IrDA IrCOMM

Supported port types (COM, IR, USB, BT) depend on device hardware.

Connector

The timeouts parameter for the Connector.open() method is not supported

HttpConnection

HTTP or WAP WSP protocol

HttpsConnection

HTTPS (i.e. HTTP over TLS) or WAP WTLS (WSP) protocol

SecureConnection

TLS or SSLv3

ServerSocketConnection

TCP/IP (server side)

SocketConnection

TCP/IP (client side)

UDPDatagramConnection

UDP/IP

PushRegistry

List of supported protocols:

  • Bluetooth RFCOMM

  • Bluetooth L2CAP

  • SMS

  • MMS

  • SIP

  • datagram

  • socket

OutputStream

The S60 platform buffers bytes written to the output stream. If your application requires that bytes written to the output stream, by sent immediately, then call the os.flush method right after the os.write method to ensure that buffered output bytes are written out.

OutputStream os;
...
os.write("hello".getBytes());
os.flush();
...

Push Registry and datagram protocol

If a MIDlet registers a datagram connection, then the network connection is always on even when no MIDlets are running.