List of usage examples for java.io PrintStream println
public void println(Object x)
From source file:VarArgsDemo.java
static void process(PrintStream out, Object... args) { line();/* w ww .j a v a 2s.c o m*/ for (int i = 0; i < args.length; i++) { out.println("Argument " + i + " is " + args[i]); } }
From source file:com.aliyun.openservices.odps.console.resource.DropFunctionCommand.java
public static void printUsage(PrintStream out) { out.println("Usage: drop function <functionname>"); out.println(" delete function <functionname> [-p,-project <projectname>]"); }
From source file:com.aliyun.openservices.odps.console.resource.DropResourceCommand.java
public static void printUsage(PrintStream out) { out.println("Usage: drop resource <resourcename>"); out.println(" delete resource <resourcename> [-p,-project <projectname>]"); }
From source file:com.aliyun.openservices.odps.console.pub.StatusOfInstanceCommand.java
public static void printUsage(PrintStream stream) { stream.println("Usage: status [extended] <instanceID>"); }
From source file:com.google.testing.pogen.PageObjectGenerator.java
/** * Prints the usage of the PageObjectGenerator with the specified {@link PrintStream} instance. * /*from ww w. jav a 2s.c o m*/ * @param printStream the {@link PrintStream} to print */ private static void printUsage(PrintStream printStream) { printStream.println("usage: java PageObjectGenerator COMMAND [ARGS]"); printStream.println("The commands are:"); printStream.format(" %-10s Generate modified templates and skeleton test code\n", GENERATE_COMMAND); printStream.format(" %-10s Measure template-variable coverage\n", MEASURE_COMMAND); printStream.format(" %-10s List template variables and ids\n", LIST_COMMAND); }
From source file:com.aliyun.openservices.odps.console.resource.GetResourceCommand.java
public static void printUsage(PrintStream out) { out.println("Usage: get resource [<projectname>:]<resourcename> <path>"); }
From source file:Main.java
/** * Prints a textual representation of the given node to the specified PrintStream. * * @param n Node that is to be printed. * @param out The PrintStream to which the node is to be printed. * @pre n != null && out != null *//*from ww w . ja v a 2 s .c o m*/ public static void printXMLNode(Node n, PrintStream out) { switch (n.getNodeType()) { case Node.DOCUMENT_NODE: out.println("DOC_ROOT"); break; case Node.ELEMENT_NODE: out.println("<" + ((Element) n).getTagName() + ">"); break; case Node.ATTRIBUTE_NODE: out.println("@" + ((Attr) n).getName()); break; case Node.TEXT_NODE: out.println("\"" + ((Text) n).getWholeText().trim() + "\""); break; case Node.COMMENT_NODE: out.println("COMMENT: \"" + n.getTextContent().trim() + "\""); break; default: out.println("Unknown node type: " + n.getNodeType()); } }
From source file:Main.java
/** * Convenient method to print an iterable. * @param iterable iterable to print//from w ww . j ava 2s. c o m * @param out print stream */ public static void println(Iterable iterable, PrintStream out) { for (Object o : iterable) { if (o == null) { continue; } out.println(o.toString()); } }
From source file:com.aliyun.openservices.odps.console.pub.StopInstanceCommand.java
public static void printUsage(PrintStream stream) { stream.println("Usage: kill [instanceID]"); }
From source file:ja.lingo.application.util.messages.ErrorDumper.java
public static String dump(Throwable t) { LOG.error("Internal error occured", t); String fileName = EngineFiles.calculateInWorking("log"); try {// ww w . ja v a 2 s . c om Files.ensureDirectoryExists(fileName); } catch (IOException e) { log(fileName, e, t); } fileName = new File(fileName, FILE_NAME_FORMAT.format(new Date())).toString(); PrintStream ps = null; try { ps = new PrintStream(new FileOutputStream(fileName)); ps.println("JaLingo Internal Error Log"); ps.println("=========================="); ps.println("Version : " + JaLingoInfo.VERSION); ps.println("Exception: ..."); t.printStackTrace(ps); } catch (IOException e) { log(fileName, e, t); } finally { if (ps != null) { ps.close(); } } return fileName; }