Grazie, il programma non da' errori.
JFileChooser jfc=new JFileChooser();
int returnVal = jfc.showOpenDialog(this);
File momChoose;
momChoose=jfc.getSelectedFile();
urlOpened=momChoose.toString();
if(returnVal == JFileChooser.APPROVE_OPTION)
System.out.println("Errore da " + urlOpened);
try{
FileInputStream fi = new FileInputStream(urlOpened);
BufferedInputStream buff=new BufferedInputStream(fi);
initByte=0;
while(initByte!=-1){
try{
initByte=buff.read();
} catch(IOException eiox){
System.out.println("Eccezione io: " + eiox.toString());
}
testo.append(""+initByte+"");
}
}
catch(FileNotFoundException filenf2){
System.out.println("Eccezione: " + filenf2.toString());
}
Perche' quando apro un file e cerco di leggerlo mi restisce solo numeri?
E perche' (nella linea rossa) returnVal e' sempre diverso da JFileChooser.APPROVE_OPTION?