BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 08-02-2008, 06:48 AM   #1 (permalink)
New Member
Join Date: Jun 2008
Model: 8100
Carrier: Vodafone
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default WAPIOException on openInputStream()

Please Login to Remove!


Am getting when i try to get the InputStream.

The code is,

c = (HttpConnection),
Connector.READ_WRITE, true);
os = c.openOutputStream();
int length = msg.length;
int offset = 0;
while (offset < length) {
int xferBytes = 512; //send 512bytes at once
if ((length - offset) < xferBytes)
xferBytes = (length - offset);
os.write(msg, offset, xferBytes);
offset += xferBytes;

is = c.openDataInputStream();

still the getting connection and writing got success, [thats i verified by using the log messages] but why i try to get InputStream, am getting the exception.

Note: The same code is execute perfectly at first time. This exception only in model 8310, v4.2.2.163 [Platform].

Please guide me how can i avoid this exception.

Thanks & Regards

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.