Package java.io

Examples of java.io.PrintStream.printf()


            ((LogService) logService).log(level, message, t);
        }
        else
        {
            PrintStream out = (level <= LogService.LOG_ERROR) ? System.err : System.out;
            out.printf("%s: %s (%d): %s%n", toLevelString(level), context.getBundle().getSymbolicName(), context
                .getBundle().getBundleId(), message);
            if (t != null)
            {
                t.printStackTrace(out);
            }
View Full Code Here


                }               
                //MavenUtil.resolveModules(embedder,mp,getRootPath(rootPOMRelPrefix),relPath,listener,nonRecursive);

                if(verbose) {
                    for (Entry<String,MavenProject> e : canonicalPaths.entrySet())
                        logger.printf("Discovered %s at %s\n",e.getValue().getId(),e.getKey());
                }

                Set<PomInfo> infos = new LinkedHashSet<PomInfo>();
               
                if (maven3OrLater) {
View Full Code Here

    @Override
    public String toString() {
      ByteArrayOutputStream buf = new ByteArrayOutputStream();
      PrintStream out = new PrintStream(buf, true);
      out.printf("%-10s %-70s %-15s s=%-5b e=%-5b t=%-5b goto=%s", label, operation,
          block == null ? null : block.getId(), blockStartsHere, blockEndsHere,
          terminal, gotoLabels);
      return buf.toString();
    }
View Full Code Here

     * @tests java.io.PrintStream#printf(java.util.Locale, java.lang.String,
     *        java.lang.Object...)
     */
    public void test_printfLjava_util_Locale_Ljava_lang_String_$Ljava_lang_Object() {
        PrintStream os = new PrintStream(bos, false);
        os.printf(Locale.US, "%s %s", "Hello", "World");
        os.flush();
        ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
        byte[] rbytes = new byte[11];
        bis.read(rbytes, 0, rbytes.length);
        assertEquals("Wrote incorrect string", "Hello World",
View Full Code Here

    /**
     * @tests java.io.PrintStream#printf(java.lang.String, java.lang.Object...)
     */
    public void test_printfLjava_lang_String$Ljava_lang_Object() {
        PrintStream os = new PrintStream(bos, false);
        os.printf("%s %s", "Hello", "World");
        os.flush();
        ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
        byte[] rbytes = new byte[11];
        bis.read(rbytes, 0, rbytes.length);
        assertEquals("Wrote incorrect string", "Hello World",
View Full Code Here

            notifyEndBuild(run,aggregators);
            r = r.combine(getResult(run));
        }
       
        if (touchStoneResultCondition != null && r.isWorseThan(touchStoneResultCondition)) {
            logger.printf("Touchstone configurations resulted in %s, so aborting...%n", r);
            return r;
        }
       
        if(!p.isRunSequentially())
            for(MatrixConfiguration c : delayedConfigurations)
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

      }
    }
   
    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

      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

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.