Package java.io

Examples of java.io.PrintStream.printf()


                        out.printf("          <exclude name=\"%s\"/>\n", result.name);
                    }
                }

                out.printf("        </methods>\n");
                out.printf("      </class>\n");
            }
        }
        out.println("    </classes>");
        out.println("  </test>");
        out.println("</suite>");
View Full Code Here


        out.println("    <classes>");

        for (TestClass testClass : classes) {

            if (contains(testClass, Status.FAIL)) {
                out.printf("      <class name=\"%s\"/>\n", testClass.name);
            }
        }
        out.println("    </classes>");
        out.println("  </test>");
        out.println("</suite>");
View Full Code Here

      bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf2")), new Value(("v" + fi).getBytes()));
    }
   
    long t2 = System.currentTimeMillis();
   
    out.printf("write rate %6.2f%n", vals.size() / ((t2 - t1) / 1000.0));
   
    bmfw.close();
   
    t1 = System.currentTimeMillis();
    FileSKVIterator bmfr = FileOperations.getInstance().openReader(fname, false, fs, conf, acuconf);
View Full Code Here

      }
    }
   
    t2 = System.currentTimeMillis();
   
    out.printf("random lookup rate : %6.2f%n", 5000 / ((t2 - t1) / 1000.0));
    out.println("hits = " + hits);
   
    int count = 0;
   
    t1 = System.currentTimeMillis();
View Full Code Here

      }
    }
   
    t2 = System.currentTimeMillis();
   
    out.printf("existant lookup rate %6.2f%n", 500 / ((t2 - t1) / 1000.0));
    out.println("expected hits 500.  Receive hits: " + count);
    bmfr.close();
  }
}
View Full Code Here

    final String uploadFieldId = (uploadField == null) ? "" : uploadField.getMarkupId();

    ByteArrayOutputStream out = new ByteArrayOutputStream();
    PrintStream js = new PrintStream(out);

    js.printf("  var def=new Wicket.WUPB.Def('%s', '%s', '%s', '%s','%s');", getMarkupId(),
      statusDiv.getMarkupId(), barDiv.getMarkupId(), urlFor(ref), uploadFieldId);
    js.printf(" new Wicket.WUPB(def).bind('%s');", getCallbackForm().getMarkupId());

    response.renderOnDomReadyJavascript(new String(out.toByteArray()));
  }
View Full Code Here

    ByteArrayOutputStream out = new ByteArrayOutputStream();
    PrintStream js = new PrintStream(out);

    js.printf("  var def=new Wicket.WUPB.Def('%s', '%s', '%s', '%s','%s');", getMarkupId(),
      statusDiv.getMarkupId(), barDiv.getMarkupId(), urlFor(ref), uploadFieldId);
    js.printf(" new Wicket.WUPB(def).bind('%s');", getCallbackForm().getMarkupId());

    response.renderOnDomReadyJavascript(new String(out.toByteArray()));
  }

  /**
 
View Full Code Here

        byte[] messageMd5 = messageDigest.digest(messageBytes);
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        PrintStream printStream = new PrintStream(out);
        for (byte b : messageMd5) {
            int u_b = (b < 0) ? 256 + b : b;
            printStream.printf("%02x", u_b);
        }
        return out.toString();
    }

    public void handleChallenge(SipRequest sipRequest,
View Full Code Here

      bmfw.append(new org.apache.accumulo.core.data.Key(new Text("r" + fi), new Text("cf2")), new Value(("v" + fi).getBytes(Constants.UTF8)));
    }
   
    long t2 = System.currentTimeMillis();
   
    out.printf("write rate %6.2f%n", vals.size() / ((t2 - t1) / 1000.0));
   
    bmfw.close();
   
    t1 = System.currentTimeMillis();
    FileSKVIterator bmfr = FileOperations.getInstance().openReader(fname, false, fs, conf, acuconf);
View Full Code Here

      }
    }
   
    t2 = System.currentTimeMillis();
   
    out.printf("random lookup rate : %6.2f%n", 5000 / ((t2 - t1) / 1000.0));
    out.println("hits = " + hits);
   
    int count = 0;
   
    t1 = System.currentTimeMillis();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.