List of usage examples for java.io PrintStream println
public void println(Object x)
From source file:dk.hippogrif.prettyxml.app.Main.java
private static void version(PrintStream ps) { ps.println("prettyxml version " + version); ps.println("Copyright (C) 2005 Jesper Goertz"); ps.println("All Rights Reserved, http://hippogrif.dk/sw/prettyxml"); ps.println("prettyxml comes with ABSOLUTELY NO WARRANTY"); ps.println("this is free software under GNU GENERAL PUBLIC LICENSE Version 2"); }
From source file:dk.hippogrif.prettyxml.Main.java
private static void help(PrintStream ps) { ps.println("prettyxml prettyprints an xml file"); ps.println(""); usage(ps);/* ww w.j a v a2 s . c o m*/ ps.println(""); ps.println("the property file may hold the following properties:"); ps.println(" encoding = string, e.g., UTF-8 (default), ISO-8859-1"); ps.println(" expandEmptyElements = TRUE | FALSE (default)"); ps.println(" indent = no of spaces to indent (min 1, max 99)"); ps.println(" lineSeparator = string, i.e., \\r, \\n or \\r\\n (default)"); ps.println(" omitDeclaration = TRUE | FALSE (default)"); ps.println(" omitEncoding = TRUE | FALSE (default)"); ps.println(" textMode = NORMALIZE | TRIM | TRIM_FULL_WHITE | PRESERVE (default)"); ps.println(" indentAttributes = TRUE | FALSE (default)"); ps.println(" sortAttributes = TRUE | FALSE (default)"); ps.println(" transform = an xslt pipeline of one or more stylesheets separated by ;"); ps.println(" input = input file"); ps.println(" url = input url"); ps.println(" output = output file"); ps.println(""); ps.println("use the xslt pipeline to sort elements or filter nodes -"); ps.println("stylesheets are located first as files then as resources on the classpath."); ps.println("standard input is used if no file or url is specified"); ps.println("standard output is used if no file is specified"); }
From source file:Stats.java
/** * Prints the means and standard deviation of the data to the specified * PrintStream//from w w w . j av a 2s .c o m * * @param v * contains the data * @param s * is the corresponding PrintStream */ public static void analyse(double[] v, PrintStream s) { s.println("Average = " + mean(v) + " sd = " + sdev(v)); }
From source file:com.aliyun.openservices.odps.console.commands.ShowPartitionsCommand.java
public static void printUsage(PrintStream stream) { stream.println("Usage: show partitions [<projectname>.]<tablename> [partition(<spec>)]"); stream.println(" list|ls partitions [-p,-project <projectname>] <tablename> [(<spec>)]"); }
From source file:com.intel.hadoop.hbase.dot.TestHiveIntegration.java
@BeforeClass public static void setUp() throws Exception { Configuration config = TEST_UTIL.getConfiguration(); config.set("hbase.coprocessor.region.classes", "com.intel.hadoop.hbase.dot.access.DataManipulationOps"); config.set("hbase.coprocessor.master.classes", "com.intel.hadoop.hbase.dot.access.DataDefinitionOps"); TEST_UTIL.startMiniCluster(1);/*from w ww .j a v a 2s . com*/ TEST_UTIL.startMiniMapReduceCluster(); initialize(TEST_UTIL.getConfiguration()); // 1. To put the test data onto miniDFS, and get the file path FileSystem fs = FileSystem.get(config); FSDataOutputStream output = fs.create(new Path("/tsvfile")); PrintStream out = new PrintStream(output); out.println("row1|row1_fd1|row1_fd2|row1_fd3|row1_fd4"); out.println("row2|row2_fd1|row2_fd2|row2_fd3|row2_fd4"); out.println("row3|row3_fd1|row3_fd2|row3_fd3|row3_fd4"); out.println("row4|row4_fd1|row4_fd2|row4_fd3|row4_fd4"); out.println("row5|row5_fd1|row5_fd2|row5_fd3|row5_fd4"); out.close(); output.close(); // fs.copyFromLocalFile(new Path("./src/test/data/data"), new // Path("/tsvfile")); assertEquals("tsv file name is not correct", fs.listStatus(new Path("/tsvfile"))[0].getPath().getName(), "tsvfile"); }
From source file:dk.hippogrif.prettyxml.app.Main.java
private static void help(PrintStream ps) { ps.println("prettyxml prettyprints an xml file"); ps.println(""); usage(ps);//from ww w . jav a 2 s . com ps.println(""); ps.println("the property file may hold the following properties:"); ps.println(" encoding = string, e.g., UTF-8 (default), ISO-8859-1"); ps.println(" expandEmptyElements = TRUE | FALSE (default)"); ps.println(" indent = no of spaces to indent (min 1, max 99)"); ps.println(" lineSeparator = string, i.e., \\r, \\n or \\r\\n (default)"); ps.println(" omitDeclaration = TRUE | FALSE (default)"); ps.println(" omitEncoding = TRUE | FALSE (default)"); ps.println(" textMode = NORMALIZE | TRIM | TRIM_FULL_WHITE | PRESERVE (default)"); ps.println(" indentAttributes = TRUE | FALSE (default)"); ps.println(" sortAttributes = TRUE | FALSE (default)"); ps.println(" transform = an xslt pipeline of one or more stylesheets separated by ;"); ps.println(" input = input file"); ps.println(" url = input url"); ps.println(" output = output file"); ps.println(""); ps.println("use the xslt pipeline to sort elements or filter nodes"); ps.println("standard input is used if no file or url is specified"); ps.println("standard output is used if no file is specified"); ps.println("property file and transformation stylesheets are located in this order:"); ps.println(" built-in, file, classpath resource"); ps.print("built-in property files:"); String[] sa = PrettyPrint.getSettings(); for (int i = 0; i < sa.length; i++) { ps.print(" " + sa[i]); } ps.println(""); ps.print("built-in transformation stylesheets:"); sa = PrettyPrint.getTransformations(); for (int i = 0; i < sa.length; i++) { ps.print(" " + sa[i]); } ps.println(""); }
From source file:com.twinsoft.convertigo.engine.util.FileUtils.java
public static void saveProperties(Map<String, String> map, File file, String encoding) throws IOException { PrintStream ps = new PrintStream(file, encoding); for (Entry<String, String> entry : map.entrySet()) { ps.println(entry.getKey()); ps.println(entry.getValue());//from w w w.jav a2s .com ps.println(); } ps.close(); }
From source file:com.p2p.peercds.cli.TorrentMain.java
/** * Display a message and program usage on the given {@link PrintStream}. */// w ww . j ava 2 s .c o m private static void usage(PrintStream s, String msg) { if (msg != null) { s.println(msg); s.println(); } s.println("usage: Torrent [options] [file|directory]"); s.println(); s.println("Available options:"); s.println(" -h,--help Show this help and exit."); s.println(" -t,--torrent FILE Use FILE to read/write torrent file."); s.println(); s.println(" -c,--create Create a new torrent file using " + "the given announce URL and data."); s.println(" -a,--announce Tracker URL (can be repeated)."); s.println(); }
From source file:mjc.ARMMain.java
public static void compile(InputStream in, PrintStream out) throws Exception { // First generate a header to the file and make "main" visible to the linker out.println("@ Generated by mjavac\n@ Authors: Tobias Eriksson, Sebastian Sjgren"); out.println("\t.global main\n"); // Parse the InputStream "in" Parser p = new Parser(in); p.Parse();/*from w w w. j av a2s . c o m*/ Program program = (Program) p.getRoot(); //program.print("", true); // Build the symbol table and perform type checking. BuildSymbolTableVisitor stv = new BuildSymbolTableVisitor(); stv.visit(program); DepthFirstTypeVisitor typeCheck = new DepthFirstTypeVisitor(stv.table); typeCheck.visit(program); // Translate to intermediate code Translator translator = new Translator(stv.table); translator.Translate(program, factory); //translator.printResults(); // Generate instructions for (ProcFragment pf : translator.fragments) { StmList stmlist = canon.Canon.linearize(pf.body); BasicBlocks bb = new BasicBlocks(stmlist); TraceSchedule ts = new TraceSchedule(bb); //ts.stms.print("", true); // Remove trivial jumps RemoveTrivialJumps rtj = new RemoveTrivialJumps(ts.stms); stmlist = rtj.stms(); InstrList body = null; while (stmlist != null) { InstrList islist = pf.frame.codegen(stmlist.head); body = pf.frame.append(body, islist); stmlist = stmlist.tail; } body = pf.frame.procEntryExit2(body); Proc proc = pf.frame.procEntryExit3(body); //emitInstructions(pf.frame, proc, out); RegAlloc regalloc = new RegAlloc(pf.frame, proc.body); emitInstructions(regalloc, proc, out); } }
From source file:ca.uqac.dim.mapreduce.ltl.LTLValidation.java
private static void print(PrintStream out, String s, int verb) { if (verb <= m_verbosity) out.println(s); }