List of usage examples for java.io PrintStream println
public void println(Object x)
From source file:haven.Config.java
private static void usage(PrintStream out) { out.println("usage: haven.jar [OPTIONS] [SERVER[:PORT]]"); out.println("Options include:"); out.println(" -h Display this help"); out.println(" -d Display debug text"); out.println(" -P Enable profiling"); out.println(" -G Enable GPU profiling"); out.println(" -p FILE Write player position to a memory mapped file"); out.println(" -U URL Use specified external resource URL"); out.println(" -r DIR Use specified resource directory (or HAVEN_RESDIR)"); out.println(" -A AUTHSERV[:PORT] Use specified authentication server"); out.println(" -u USER Authenticate as USER (together with -C)"); out.println(" -C HEXCOOKIE Authenticate with specified hex-encoded cookie"); }
From source file:com.titilink.camel.rest.util.OtherUtil.java
/** * ?/*from w ww . ja v a 2s. c om*/ * * @param info --? */ public static void systemOut(String info) { //??? PrintStream ps = System.out; ps.println(info); }
From source file:com.ibm.team.build.internal.hjplugin.RTCFacadeFactory.java
private static void debug(PrintStream debugLog, String msg, Exception e) { LOGGER.log(Level.FINER, msg, e); if (debugLog != null) { debugLog.println(msg); e.printStackTrace(debugLog);//from w w w .j a v a 2 s . co m } }
From source file:com.adobe.acs.tools.csv.impl.CsvUtil.java
/** * Adds a populated terminating field to the ends of CSV entries. * If the last entry in a CSV row is empty, the CSV library has difficulty understanding that is the end of the row. * * @param is the CSV file as an inputstream * @param separator The field separator/*from w w w . j a v a 2s.co m*/ * @param charset The charset * @return An inputstream that is the same as is, but each line has a populated line termination entry * @throws IOException */ public static InputStream terminateLines(final InputStream is, final char separator, final String charset) throws IOException { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final PrintStream printStream = new PrintStream(baos); final LineIterator lineIterator = IOUtils.lineIterator(is, charset); while (lineIterator.hasNext()) { String line = StringUtils.stripToNull(lineIterator.next()); if (line != null) { line += separator + TERMINATED; printStream.println(line); } } return new ByteArrayInputStream(baos.toByteArray()); }
From source file:com.aliyun.openservices.odps.console.pub.ShowInstanceCommand.java
public static void printUsage(PrintStream stream) { stream.println("Usage: show p [<number>]"); stream.println(" show proc|processlist"); stream.println(" show|ls|list instances [<number>]"); }
From source file:com.aptana.core.epl.downloader.RepositoryStatusHelper.java
private static void deeplyPrint(IStatus status, PrintStream strm, boolean stackTrace, int level) { appendLevelString(strm, level);/*from w ww . j a v a 2 s. c om*/ String msg = status.getMessage(); strm.println(msg); Throwable cause = status.getException(); if (cause != null) { strm.print("Caused by: "); //$NON-NLS-1$ if (stackTrace || !(msg.equals(cause.getMessage()) || msg.equals(cause.toString()))) deeplyPrint(cause, strm, stackTrace, level); } if (status.isMultiStatus()) { IStatus[] children = status.getChildren(); for (int i = 0; i < children.length; i++) deeplyPrint(children[i], strm, stackTrace, level + 1); } }
From source file:edu.internet2.middleware.shibboleth.common.attribute.AttributeAuthorityCLI.java
/** * Prints a help message to the given output stream. * /*from w w w . j a v a 2 s . com*/ * @param out output to print the help message to */ private static void printHelp(PrintStream out) { out.println("Attribute Authority, Command Line Interface"); out.println(" This tools provides a command line interface to the Shibboleth Attribute Authority,"); out.println(" providing deployers a means to test their attribute resolution and configurations."); out.println(); out.println("usage:"); out.println(" On Unix systems: ./aacli.sh <PARAMETERS>"); out.println(" On Windows systems: .\\aacli.bat <PARAMETERS>"); out.println(); out.println("Required Parameters:"); out.println(String.format(" --%-16s %s", CLIParserBuilder.CONFIG_DIR, "Directory containing attribute authority configuration files")); out.println(String.format(" --%-16s %s", CLIParserBuilder.PRINCIPAL, "Principal name (user id) of the person whose attributes will be retrieved")); out.println(); out.println("Optional Parameters:"); out.println(String.format(" --%-16s %s", CLIParserBuilder.HELP, "Print this message")); out.println(String.format(" --%-16s %s", CLIParserBuilder.SPRING_EXTS, "Colon-delimited list of files containing Spring extension configurations")); out.println(String.format(" --%-16s %s", CLIParserBuilder.REQUESTER, "SAML entity ID of the relying party requesting the attributes. For example, the SPs entity ID. " + "If not provided, requester is treated as anonymous.")); out.println(String.format(" --%-16s %s", CLIParserBuilder.AUTHN_METHOD, "Method used to authenticate the user")); out.println( String.format(" --%-16s %s", CLIParserBuilder.SAML1, "No-value parameter indicating the attribute " + "authority should answer as if it received a SAML 1 request")); out.println(); }
From source file:MainClass.java
public static void print(Node node, OutputStream os) { PrintStream ps = new PrintStream(os); switch (node.getNodeType()) { case Node.ELEMENT_NODE: ps.print("<" + node.getNodeName()); NamedNodeMap map = node.getAttributes(); for (int i = 0; i < map.getLength(); i++) { ps.print(" " + map.item(i).getNodeName() + "=\"" + map.item(i).getNodeValue() + "\""); }/* w w w .ja va2 s . com*/ ps.println(">"); return; case Node.ATTRIBUTE_NODE: ps.println(node.getNodeName() + "=\"" + node.getNodeValue() + "\""); return; case Node.TEXT_NODE: ps.println(node.getNodeValue()); return; case Node.CDATA_SECTION_NODE: ps.println(node.getNodeValue()); return; case Node.PROCESSING_INSTRUCTION_NODE: ps.println(node.getNodeValue()); return; case Node.DOCUMENT_NODE: case Node.DOCUMENT_FRAGMENT_NODE: ps.println(node.getNodeName() + "=" + node.getNodeValue()); return; } }
From source file:ar.com.qbe.siniestros.model.utils.MimeMagic.Magic.java
/** * print a magic match/*from w w w . j av a 2s. c om*/ * * @param stream DOCUMENT ME! * @param matcher DOCUMENT ME! * @param spacing DOCUMENT ME! */ private static void printMagicMatcher(PrintStream stream, MagicMatcher matcher, String spacing) { stream.println(spacing + "name: " + matcher.getMatch().getDescription()); stream.println(spacing + "children: "); Collection matchers = matcher.getSubMatchers(); Iterator i = matchers.iterator(); while (i.hasNext()) { printMagicMatcher(stream, (MagicMatcher) i.next(), spacing + " "); } }
From source file:com.liusoft.dlog4j.util.RequestUtils.java
/** * ??/*ww w.java 2 s . co m*/ * @param out * @param req */ public static void dumpHeaders(PrintStream out, HttpServletRequest req) { Enumeration names = req.getHeaderNames(); while (names.hasMoreElements()) { String name = (String) names.nextElement(); out.println(name + "=" + req.getHeader(name)); } }