posted 13 years ago
Looks good, but you're redefining the "out" parameter that you pass into formatTx(). I think the idea is to setup your PrintWriter first, then call formatTx() as it was written in your original example.
Something like:
Also keep in mind that streams that are opened must be closed. So always use something like:
Not closing file streams, sockets, and database connections is an easy mistake to make, but it can cause your program to slowly grind to a halt after seeming to work fine for hours or even days.