- Generalization of J2SE NW and I/O framework
- Can map to low level hardware/J2SE classes
- General Form
Connector.open("
- Static function
- No network protocols defined in CLDC
- Bulk of App code stays same for diff protocols
- Protocol Binding done at runtime.
- Implemented as a hierarchy of connection interfaces(7)
- One exception class: ConnectorNotFound
- Interface Connection- Basic Connection
- Interface InputConnection- Device with data read capability
public DataInputStream openDataInputStream() throws IOException;
- Interface OutputConnection- Device with Data write capability
DataOutputStream openDataOutputStream() throws IOException;
- Interface StreamConnection-Combines InputConnection & OutputConnection
- Interface ContentConnection -Sub interface of StreamConnection-Access to HTTP metadata
public String getEncoding();
public long getLength();
- Interface StreamConnectionNotifier
- Interface DatagramConnection -Datagram endpoint
public int getNominalLength() IOException;
- Other functions for
- send,
- receive,
- 4 newDatagram(with params byte, size, address)
- has a data buffer associated with it.
- Use DataInput and DataOutput.
- Can behave like a stream