View Single Post
  #1 (permalink)  
Old 06-19-2007, 08:51 PM
bbq bbq is offline
Senior Member
 
Join Date: Jun 2007
Posts: 134
bbq is on a distinguished road
BufferedReader: readLine method problems
I'm reading a txt file that contents a text line under the other text line, when I read each line and then print them, it prints without the first character

for example :
Apples
bread
but the program shows this
pples
read
this is the code

Code:
FileInputStream _file = new FileInputStream(pFile); BufferedReader _text= new BufferedReader(new InputStreamReader(_file)); while ( _text.read() != -1 ) { System.out.println(_text.readLine()); } _text.close();
any ideas?
Reply With Quote
Sponsored Links