BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 07-25-2007, 08:37 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
Posts: 150
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to store an image as byte array in a file?

Please Login to Remove!

I hava byte array that is corresponding to an image (.jpeg or .png), so i want to make an image file on the device (for example image.jpeg or image.png to be stored in the path: "file:///SDCard/images/")..When i open the image.jpeg to see the image...Do you know how...Give me some code or classes to use...i use JDE 4.2.0..Thank you !
Offline  
Old 08-06-2007, 12:11 AM   #2 (permalink)
Thumbs Must Hurt
 
Rose's Avatar
 
Join Date: Nov 2006
Location: India
Model: 9700
OS: Windows 7
Carrier: Airtel
Posts: 121
Post Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation

Hi,
This can be done using javaME Fileconnection api.


1) Open a file connection specifying the filepath where you wanna create the image.


FileConnection fp = (FileConnection)Connector.open("FilePath");
if(!fp.exists()){
fp.create();
OutputStream out = fp.openOutputStream();
out.write(imageBytes);
fp.close();
out.close();
}
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

Danfoss MBS-5100 Pressure Transducer, 0-10Bar OEM 060N1036 CAT 141-9880
$99.0
Danfoss MBS-5100 Pressure Transducer, 0-10Bar OEM 060N1036 CAT 141-9880 picturePressure Transducer, 0 to 200 PSI, +/-1Pct
$122.53
Pressure Transducer, 0 to 200 PSI, +/-1Pct picturePressure Transducer, 0 to 500 PSI, +/-1Pct
$122.53
Pressure Transducer, 0 to 500 PSI, +/-1Pct picture1pcs D20mm Ultrasonic Atomizing Transducer Mist Maker Ceramic Humidifierj0j
$0.99
1pcs D20mm Ultrasonic Atomizing Transducer Mist Maker Ceramic Humidifierj0j picture1pcs D20mm Ultrasonic Atomizing Transducer Mist Maker Ceramic Humidifierj0j
$0.99
1pcs D20mm Ultrasonic Atomizing Transducer Mist Maker Ceramic Humidifierj0j picture






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