code: private static void print(int width, boolean alignRight, PrintStream out, Object obj) {
          String s = String.valueOf(obj);
          int padLen = width - s.length();
          if (alignRight) {
              pad(padLen, out);
          }
          out.print(s); // doesn't truncate if (s.length() > width)
          if (!alignRight) {
              pad(padLen, out);
          }
      }
docs: equivalent to out.print(obj) except it may be padded on the left or right
  
  @param width
  padding will occur if the stringified oxj is shorter than this
  @param alignRight
  true to pad on the left, false to pad on the right
  @param out
  the PrintStream printed to
  @param obj
  the value to print (may be an auto-boxed primitive)