Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

file browse J2ME

 
nitish dhar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i downloaded a file browse code from the net...it runs fine

but the problem is that after i press the view command it asks for permissions more than once to read the files inside a particular folder

I think the problem is how the code creates the file connector:



wat modifications am i supposed to make



[ August 28, 2008: Message edited by: nitish dhar ]
[ August 28, 2008: Message edited by: nitish dhar ]
 
nitish dhar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got it done in the preference>>security set security as manufacturer

no more access permissions now
 
Rhianty Alfa
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to modification this method (showFile)
InputStream fis = fc.openInputStream ();
byte[] b = new byte[1024];

int length = fis.read (b, 0, 1024);

fis.close ();
fc.close ();

TextBox viewer =
new TextBox (
"View File: " + fileName, null, 1024,
TextField.ANY | TextField.UNEDITABLE);

viewer.addCommand (back);
viewer.addCommand (exit);
viewer.setCommandListener (this);

if (length > 0) {
viewer.setString (new String (b, 0, length));
}

Display.getDisplay (this).setCurrent (viewer);

it's just show file with extension *.txt
how to read a file pdf (*.pdf)??

Regards,
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17995
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Rhianty!

I think your answer came a little too late. We call this "awakening a zombie". Since the last post was in 2008, it's very likely that not only is Nitesh working on some other project by now, he's probably not even working for the same employer!
 
Rhianty Alfa
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i don't understand what you say....
well, I apologize if I was presumptuous to write as above. I just want to find a solution to my final project.

thanks
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17995
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't call it "presumptuous". We certainly welcome published solutions to any problem. Just pointing out that it's probably too late to help the original posters.

You can start your own thread, though anytime you have a topic of interest.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic