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,