Motorola E680 Technical Manual - Page 44
Motorola implementation supports a HTTPS connection on the Motorola E680 handset.
View all Motorola E680 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 44 highlights
HTTPS Connection Motorola implementation supports a HTTPS connection on the Motorola E680 handset. Additional protocols that will be supported are the following: • TLS protocol version 1.0 as defined in http://www.ietf.org/rfc/rfc2246.txt • SSL protocol version 3.0 as defined in http://home.netscape.com/eng/ssl3/draft302.txt The following is a code sample to show implementation of HTTPS: HTTPS import javax.microedition.io.*; import java.io.*; import javax.microedition.midlet.*; ... try { hc[i] = (HttpConnection)Connector.open("https://" + url[i] + "/"); } catch (Exception ex) { hc[i] = null; System.out.println("Open Failed: " + ex.getMessage()); } if (hc[i] != null) { try { is[i] = hc[i].openInputStream(); byteCounts[i] = 0; readLengths[i] = hc[i].getLength(); System.out.println("readLengths = " + readLengths[i]); if (readLengths[i] == -1) { readLengths[i] = BUFFER_SIZE; } int bytes_read = 0; int offset = 0; int bytes_left = (int)readLengths[i]; do 44