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

MOS 6502 B Commodore 1541 CPU 40-Pin PDIP Used
$10.0
MOS 6502 B Commodore 1541 CPU 40-Pin PDIP Used  pictureMOS 325572-01 Commodore 1541 40-PIN Gate Array (x1)
$7.0
MOS 325572-01 Commodore 1541 40-PIN Gate Array (x1) pictureMOS 906114-01 Commodore 64 PLA 28-Pin PDIP Used-Pull
$25.0
MOS 906114-01 Commodore 64 PLA 28-Pin PDIP Used-Pull  pictureEPYX 500XJ joystick *Tested* use w/ Atari 2600, Commodore 64 AMIGA ~
$11.91
EPYX 500XJ joystick *Tested* use w/ Atari 2600, Commodore 64 AMIGA ~ pictureReconditioned Windsor Commodore 20 Carpet Extractor
$3025.0
Reconditioned Windsor Commodore 20 Carpet Extractor picture






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