aspose file tools*
The moose likes I/O and Streams and the fly likes read chunks instead of lines with bufferReader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "read chunks instead of lines with bufferReader" Watch "read chunks instead of lines with bufferReader" New topic
Author

read chunks instead of lines with bufferReader

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
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

Joined: Jul 08, 2003
Posts: 24187
    
  34

If you want to read 128 bytes (or 128 characters), then you don't need a BufferedReader at all.



[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: read chunks instead of lines with bufferReader