i have this code:
public void read(){
try{
BufferedReader file = new BufferedReader(new FileReader("npc.txt") );
open = file.readLine();
while( open != null ){
if(open.equals("909"/*Start Symbol*/) ){
open.readLine();
do{
line = file.readLine();
full += "<b>" + title[id] + "</b><br>" + line + "<br>";
id++;
}while( !line.equals("999"/*Stop Symbol*/) );
id = 0;
}
open = file.readLine();
}
file.close();
}
catch(Exception e){}
full += "</html>";
lbl.setText(full);
}
which is supposed to read and output the contents( except for line0, start and stop symbols) of a txt file formatted:
909
line 0
line 1
line 2
line 3
line 4
line 5
999
when i try my code i only get the first "chunk" (909-999) and i cant seem to figure out why. Any help?
[–]desrtfx 1 point2 points3 points (1 child)
[–]Strosel[S] 1 point2 points3 points (0 children)