BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 11-14-2007, 10:53 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Model: 8100
PIN: N/A
Carrier: movistar
Posts: 51
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Files!!

Please Login to Remove!

I have this function that reads a file on my blackberry

FileConnection fconn = (FileConnection)Connector.open("file:///"+sFile);
// If no exception is thrown, then the URI is valid, but the file may or may not exist.
System.out.println(fconn);
if (fconn.exists()) {

InputStream input = null;
input = fconn.openInputStream();
int available = 0;
available = input.available();
byte[] data = new byte[available];
input.read(data, 0, available);
// this retur my file !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
}



I want to do a getData my archvio whatever their type

" byte[] buf = myFile.getData(); "


help me please
Offline  
Old 11-14-2007, 01:21 PM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

if I understand you, you just want to return the data content. it's already there, in "data", filled when you input.read.
Offline  
Old 11-14-2007, 02:05 PM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Model: 8100
PIN: N/A
Carrier: movistar
Posts: 51
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default thank you

Thank´s, you have all reason
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

PTS PTS-M10K13M4M 10kW 13MHz , 4MHz Dual Matcher , Auto Impedance Matching
$3990.1
PTS PTS-M10K13M4M  10kW 13MHz , 4MHz Dual Matcher  , Auto Impedance Matching  pictureNEW SOFASCO TAC9225115MT 110V AC FAN .1/.08A IMPEDENCE PROTECTED ~190MM
$22.99
NEW SOFASCO TAC9225115MT 110V AC FAN .1/.08A IMPEDENCE PROTECTED ~190MM pictureRF DC BLOCK INNER, 50 Ohm Impedance, Type BNC MALE TO BNC FEMALE, 10 MHz
$16.95
RF DC BLOCK INNER, 50 Ohm Impedance, Type BNC MALE TO BNC FEMALE, 10 MHz  pictureGE General Electric 12PVD21B1A High Impedance Differential Relay PVD 60 Hz 150 V
$600.0
GE General Electric 12PVD21B1A High Impedance Differential Relay PVD 60 Hz 150 V pictureBrown Engineering Impedance Bridge in Wooden Case - Collectible (200-A)
$232.8
Brown Engineering Impedance Bridge in Wooden Case - Collectible (200-A) picture






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