0

I develop with lwuit to Nokia and Blackberry. I try to load from internet some images. In Nokia all work fine, but in blackberry i get IllegalArgumentException.

I found that problem is occurs in createImage(byte[] bytes, int offset, int len) function . The device Log tell me that source function that occurs to fail is in encode Image class.

Do Anyone encounter this problem?

neb
  • 78
  • 8

2 Answers2

3

I found the problem. This occurs because i use POST method. I think in case that we dont send parametes but use method POST is occurs to problem with Content-Length in header of http message and this the reason that i recieve error(400 or 411)

neb
  • 78
  • 8
0

The problem is probably related to networking in Blackberry which is well documented. There are multiple suggested fixes (e.g. using deviceside=true) which work for some cases but fail for others. Explaining RIM networking problems is just too much for this post, but we did solve these issues for Codename One.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • The Problem is more complicated. Another images are work and recieve in Blackberry image. the url are fine because that work on Nokia,Android and Iphone. – neb Oct 17 '12 at 06:58
  • I found the problem. This occurs because i use post method. I think in case that we dont send parametes but usemethod POST is occurs to problem with Content-Length in header of http message and recieve error(400 or 411) – neb Nov 08 '12 at 11:13