private static void writeSpaces(Writer out,int amt) throws IOException {
  while (amt > 0) {
    out.write(' ');
    amt--;
  }
}

private static void writeSpaces ( Writer out , int amt ) throws IOException { while ( amt > 0 ) { out . write ( ' ' ) ; amt -- ; } }
writes the given number of spaces to the given writer .
