int REPLICAS=5, NUMLINES=1024, NUMWORDSPERLINE=4;
final String WORD = "zymurgy"; // 7 bytes + 4 id bytes
final Formatter fmt = new Formatter(new StringBuilder());
for (int i = 0; i < REPLICAS; i++) {
for (int j = 1; j <= NUMLINES*NUMWORDSPERLINE; j+=NUMWORDSPERLINE) {
((StringBuilder)fmt.out()).setLength(0);
for (int k = 0; k < NUMWORDSPERLINE; ++k) {
fmt.format("%s%04d ", WORD, j + k);
}
((StringBuilder)fmt.out()).append("\n");
out.writeBytes(fmt.toString());