BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 05-12-2009, 05:32 PM   #1 (permalink)
New Member
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: rogers
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Loading a JPG URL error

Please Login to Remove!

I have a very annoying problem... In the simulator I can succesfully load a JPG using a ContentConnection
c = (ContentConnection)Connector.open("dub dub dub galleries/9/thumbs/sroy_5633.jpg.80.jpg");

with any of the BB simulators the line above works fine

However after compiling and moving to the device the same URL causes an IllegalArgumentException

The issue is that the filename has 2 dot jpg in it .... If I copy the file to another web server and change the name to have no double .jpg in it then the code works fine

I cannot change the filename as there are thousands of these images created with a content management system....

Can anyone suggest a work around?
I am reading the output stream to a buffer and then using EncodedImage jpeg = EncodedImage.createEncodedImage(data ,0, -1);

to get the contents

It is so annoying that the simulator works fine ... plus if I open the URL in the BB Browser then the image loads fine !!
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

MICROSOLUTIONS 836 MEMORY CARD BIN#A4-SA-5
$59.0
MICROSOLUTIONS 836 MEMORY CARD BIN#A4-SA-5 pictureSiemens PLC S7-315 2PN/DP Lightly Used W/Memory Card
$1000.0
Siemens PLC S7-315 2PN/DP Lightly Used W/Memory Card picture25pcs ATMEL AT49F002NT-90JC Flash Memory 256K x 8 (2M bit) PLCC32 *NOS 2B
$11.55
25pcs ATMEL AT49F002NT-90JC Flash Memory 256K x 8 (2M bit) PLCC32 *NOS     2B pictureLot of RAM Desktop Memory Sticks PC133 PC2 PC333 128MB 256MB 512MB 1GB
$25.42
Lot of RAM Desktop Memory Sticks PC133 PC2 PC333 128MB 256MB 512MB 1GB pictureAllen-Bradley 1747-L552 SLC 500 SLC 5/05 Processor, 32K Memory, Ethernet & RS-23
$2599.0
Allen-Bradley 1747-L552 SLC 500 SLC 5/05 Processor, 32K Memory, Ethernet & RS-23 picture






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