• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

file browse J2ME

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
got it done in the preference>>security set security as manufacturer

no more access permissions now
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic