List of usage examples for java.io PrintStream println
public void println(Object x)
From source file:com.continuuity.loom.common.queue.internal.ElementsTrackingQueueCliTool.java
private static void printHelp() { PrintStream out = System.out; out.println("Usage: "); String command = "ElementsTrackingQueueCliTool"; out.println(" " + command + " list [queue options]"); out.println(" " + command + " promote --element <element_id> [queue options]"); out.println(" " + command + " remove --element <element_id> [queue options]"); out.println(" " + command + " remove_all [queue options]"); out.println(" " + command + " help"); out.println(" queue options:"); out.println(" --zk-connection <zk_connection_string> --queue-name <queue_name>"); }
From source file:com.netflix.hollow.jsonadapter.util.JsonUtil.java
private static void print(int index, String value, PrintStream out) { for (int i = 0; i < index; i++) { out.print("\t"); }/*from w w w .ja v a 2 s .com*/ out.println(value); }
From source file:de.zazaz.iot.bosch.indego.util.CmdLineTool.java
private static void printCalendar(PrintStream out_, DeviceCalendar calendar_) { out_.println(String.format("Device calendar:")); out_.println(String.format(" Selected entry: %d", calendar_.getSelectedEntryNumber())); for (DeviceCalendarEntry entry : calendar_.getEntries()) { out_.println(String.format(" Entry %d:", entry.getNumber())); for (DeviceCalendarDayEntry day : entry.getDays()) { out_.println(String.format(" Day %d:", day.getNumber())); for (DeviceCalendarDaySlot slot : day.getSlots()) { out_.println(String.format(" %02d:%02d - %02d:%02d %s", slot.getStartHour(), slot.getStartMinute(), slot.getEndHour(), slot.getEndMinute(), slot.isEnabled() ? "ENABLED" : "DISABLED")); }/*from w w w.ja va2s .com*/ } } }
From source file:TextComponentDisplay.java
public static void displayView(View view, int tabs, PrintStream out) { // Print info about this view for (int i = 0; i < tabs; i++) { out.print("\t"); }//ww w .j ava 2s . co m out.println(view.getClass().getName()); for (int i = 0; i < tabs; i++) { out.print("\t"); } out.println("Start: " + view.getStartOffset() + "; end: " + view.getEndOffset()); // Display child views, if any. int childViews = view.getViewCount(); for (int i = 0; i < childViews; i++) { View childView = view.getView(i); displayView(childView, tabs + 1, out); } }
From source file:com.turn.ttorrent.cli.TorrentMain.java
/** * Display a message and program usage on the given {@link PrintStream}. *//* ww w .j av a 2 s. com*/ 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(" -l,--length Define the piece length for hashing data"); s.println(" -a,--announce Tracker URL (can be repeated)."); s.println(); }
From source file:de.zazaz.iot.bosch.indego.util.CmdLineTool.java
private static void printState(PrintStream out_, DeviceStateInformation state_) { out_.println(String.format("Device state:")); out_.println(String.format(" Mode: %s", DeviceStatus.decodeStatusCode(state_.getState()))); out_.println(String.format(" Error: %d", state_.getError())); out_.println(String.format(" Completed: %d %%", state_.getMowed())); out_.println(String.format(" Mowed timestamp: %s", new Date(state_.getMowedTimestamp()))); out_.println(String.format(" Mow mode: %d", state_.getMowMode())); out_.println(String.format(" Svg map timestamp: %s", new Date(state_.getMapSvgCacheTimestamp()))); out_.println(String.format(" Map update available: %s", state_.isMapUpdateAvailable() ? "yes" : "no")); out_.println(String.format(" Runtime total / operate: %.2f h", state_.getRuntime().getTotal().getOperate() / 60.0)); out_.println(String.format(" Runtime total / charge: %.2f h", state_.getRuntime().getTotal().getCharge() / 60.0)); out_.println(String.format(" Runtime session / operate: %.2f h", state_.getRuntime().getSession().getOperate() / 60.0)); out_.println(String.format(" Runtime session / charge: %.2f h", state_.getRuntime().getSession().getCharge() / 60.0)); }
From source file:com.aliyun.openservices.odps.console.commands.ShowTablesCommand.java
public static void printUsage(PrintStream stream) { stream.println("Usage: show tables [in <projectname>]"); stream.println(" list|ls tables [-p,-project <projectname>]"); }
From source file:mjc.ARMMain.java
private static void emitInstructions(TempMap tm, Proc proc, PrintStream out) { out.print(proc.begin);//from w w w .j a v a 2 s . co m InstrList islist = proc.body; while (islist != null) { out.println(islist.head.format(tm)); islist = islist.tail; } out.print(proc.end); }
From source file:com.zavakid.mushroom.impl.ConfigUtil.java
static void dump(String header, Configuration c, PrintStream out) { PropertiesConfiguration p = new PropertiesConfiguration(); p.copy(c);//from w w w . ja va 2s . c o m if (header != null) { out.println(header); } try { p.save(out); } catch (Exception e) { throw new RuntimeException("Error saving config", e); } }
From source file:dk.hippogrif.prettyxml.app.Main.java
private static void usage(PrintStream ps) { ps.println("usage: prettyxml option+"); optionUsage(ps); }