Https Connection - Motorola E680 - Smartphone - GSM Developer's Manual

Micro edition (j2me) applications
Hide thumbs Also See for E680 - Smartphone - GSM:
Table of Contents

Advertisement

HTTPS Connection

Motorola implementation supports a HTTPS connection on the Motorola E680 handset.
Additional protocols that will be supported are the following:
The following is a code sample to show implementation of HTTPS:
HTTPS
import javax.microedition.io.*;
import java.io.*;
import javax.microedition.midlet.*;
...
(HttpConnection)Connector.open("https://" + url[i] + "/");
ex.getMessage());
readLengths[i]);
44
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)
{
try {
is[i] = hc[i].openInputStream();
byteCounts[i] = 0;
readLengths[i] = hc[i].getLength();
System.out.println("readLengths = " +
if (readLengths[i] == -1)
{
readLengths[i] = BUFFER_SIZE;
}
int bytes_read = 0;
int offset = 0;
int bytes_left = (int)readLengths[i];
do
http://www.ietf.org/rfc/rfc2246.txt

Advertisement

Table of Contents
loading

Table of Contents