User Permission; Https Connection; Code Sample 2 Socket Connection - Motorola C381P J2ME Technical Manual

J2me developer guide
Table of Contents

Advertisement

8
Network APIs
ex.getMessage());

User Permission

The user of the handset will explicitly grant permission to add additional network
connections.

HTTPS Connection

Motorola implementation supports a HTTPS connection on the Motorola C381p handset.
Additional protocols that will be supported are the following:
The Code Sample 3 shows the implementation of HTTPS:
HTTPS
import javax.microedition.io.*;
import java.io.*;
import javax.microedition.midlet.*;
...
(HttpConnection)Connector.open("https://" + url[i] + "/");
ex.getMessage());
}
while (bytes_read > 0);
} catch (Exception ex) {
System.out.println("IO failed: "+
}
finally {
closeAllStreams(i); //clean up
}
}

Code Sample 2 Socket Connection

TLS protocol version 1.0 as defined in
SSL protocol version 3.0 as defined in
http://home.netscape.com/eng/ssl3/draft302.txt
try {
hc[i] =
} catch (Exception ex) {
hc[i] = null;
System.out.println("Open Failed: " +
}
if (hc[i] != null)
{
http://www.ietf.org/rfc/rfc2246.txt
32

Advertisement

Table of Contents
loading

Table of Contents