- #1
Yoss
- 27
- 0
I was curious if anyone knows if there are any methods to do the following in java.
I'm writing a terminal based program in java, and it will be doing incremental updates. I want to output to the terminal the percentage done, but to replace the last output. For example:
$>java jprog
Percent completed...0%
...
$>java jprog
Percent completed...5%.
Instead of
$>java jprog
Percent completed...0%
Percent completed...5%
...
I checked the java API's a little, in the PrintStream and OutputStream classes, but couldn't find any methods like that. Anybody know? Thanks.
I'm writing a terminal based program in java, and it will be doing incremental updates. I want to output to the terminal the percentage done, but to replace the last output. For example:
$>java jprog
Percent completed...0%
...
$>java jprog
Percent completed...5%.
Instead of
$>java jprog
Percent completed...0%
Percent completed...5%
...
I checked the java API's a little, in the PrintStream and OutputStream classes, but couldn't find any methods like that. Anybody know? Thanks.