Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

read chunks instead of lines with bufferReader

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i read a chunk of 'words'/chars from a file?

instead of:

while ((line=bufReader.readLine()) != null)

I would like to read 128 bytes of code.

can anyone assist?

 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to read 128 bytes (or 128 characters), then you don't need a BufferedReader at all.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic