Code example for PrintStream

Methods: printf

0
      doBench(CRCS, System.out);
    } 
 
    private static void printCell(String s, int width, PrintStream out) {
      final int w = s.length() > width? s.length(): width;
      out.printf(" %" + w + "s |", s);
    } 
 
    private static void doBench(final Checksum[] crcs, final PrintStream out) {
      final ArrayList<Checksum> a = new ArrayList<Checksum>();
      a.add(zip);
      for (Checksum c : crcs)
        if(c.getClass() != zip.getClass())
          a.add(c);
      doBench(a, out);
    } 
 
    private static void doBench(final List<Checksum> crcs, final PrintStream out
        ) { 
      final byte[] bytes = new byte[MAX_LEN];
      new Random().nextBytes(bytes);