mi ritrovo ad aprire file xml piuttosto pesanti
attualmente sono sui 300kb (ma in futuro aumenteranno) e già così ci metto circa 30 secondi
mi viene quindi il dubbio di usare codice poco efficiente:
è migliorabile oppure mi tocca aspettare quei tempi?codice:try { FileInputStream fstream = new FileInputStream(percorso); DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String strLine; while ((strLine = br.readLine()) != null) testo+=strLine+"\n"; in.close(); testo=testo.toString(); } catch (IOException e) { System.out.println(e.getMessage()); }
grazie

Rispondi quotando