> Building a string with a series of concatenations like this is extremely inefficient
No. Not in Java since 1999 or so.
No. Not in Java since 1999 or so.
Concat code: http://pastebin.com/CcezmJbf
Builder code: http://pastebin.com/Dd6kzcKa
Results, using JRE 7:
> time java concat data.blk Finished. java foo data.blk 170.08s user 1.52s system 102% cpu 2:48.12 total
> time java builder data.blk Finished. java builder data.blk 0.30s user 0.05s system 151% cpu 0.230 total
builder: http://hastebin.com/qadusoriqa.cs