Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
09-14-2009 03:28 PM
I am writing some data to the server which involves a JSON string as well as some images. I encode the JSON string using URLEncodedPostData with a UTF-8 character encoding and I am writing the bytes of the file to the same output stream. For some reason on the server side, Tomcat in this case, I see a bunch of Character decoding failed exceptions.
Does anyone know where I might be going wrong from this high level overview? Any suggestions as to an article or tutorial? All help much appreciated.
09-14-2009 05:58 PM
I was using iso-..... and it seems the server wanted UTF-8. I changed this around and that seemed to solve the character encoding problem. The issues I have now is that everything seemingly get's written to the server (server responds with 200 and success reply) but, the images that I write to the output stream are never written to a file on the server side.
There are images created on the server but they are all of 0 bytes in length. Is there anything specifically needed when writing images from the BB to a server such? Thanks!
09-15-2009 12:47 AM
I am reading the file from the file system/sd card using an implementation of the JSR75 spec which then returns the file as a byte array. I then write this array out to the OutputStream of the HTTPConnection. I have heard that some transport protocols required base64 encoding, is this something I need for this scenario or is there something else? Thank you for all of your help.