Hi,
I'm having issues with a generic JavaME application when opening an https connection on an OS 4.1 device. Using the following code I get an IOException "Input stream already open":
Code:
byte[] data = null;
DataInputStream input = null;
DataOutputStream output = null;
HttpConnection conn = null;
try {
conn = (HttpConnection)Connector.open(url);
input = conn.openDataInputStream();
output = conn.openDataOutputStream();
data = new byte[input.available()];
input.readFully(data);
} catch(Throwable t) {
t.printStackTrace();
}
Looking at the stack trace I believe the exception is thrown inside conn.openDataOutputStream();
This works fine on OS 4.2 and up, and changing the url to 'http:' works fine.
Any ideas?
Cheers