BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-14-2007, 09: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, 12: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, 01: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





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