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

Lot of (8) Vintage Apple Store Shopping Bags 17" W x 18" L VERY RARE HTF NEW
$39.95
Lot of (8) Vintage Apple Store Shopping Bags 17Vintage - Pat. Appl'd For - BEEDE METER - Pocket Size Volt Ametter - Not Tested
$12.99
Vintage - Pat. Appl'd For - BEEDE METER - Pocket Size Volt Ametter - Not Tested  pictureVINTAGE APPLE MOUSEPAD II IIC IIE MAC MACINTOSH 1984 1985 RETRO
$9.99
VINTAGE APPLE MOUSEPAD II IIC IIE MAC MACINTOSH 1984 1985 RETRO pictureVintage Letterpress Print Type Ornament Apple for Teacher Adcut
$9.5
Vintage Letterpress Print Type Ornament Apple for Teacher Adcut pictureVtg Vernier System Parts Kit PGK-DG-Photogate Windows Macintosh CBL IBM Apple2
$14.99
Vtg Vernier System Parts Kit PGK-DG-Photogate Windows Macintosh CBL IBM Apple2 picture






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