Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String of 128 bytes?

Status
Not open for further replies.

Funkymatt

Programmer
Aug 27, 2002
101
US
All,
I have an imput file with only one line. That line has many (greater than 60K bytes). I want to read that line in 128 bytes at a time.

Once stored, I want to output to a file the each 128 byte chunck to a separate line.

How do I read in a line that long and store it so so I hold only 128 bytes at a time.
 
I can think on several ways.

You can use a ByteInputStream and read blocks of 128 bytes.

Or maybe read it just in one line and use the substring function to divide it.

I think I bet for the first one.

Cheers.

Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top