Package java.io

Examples of java.io.PrintWriter.format()


            if (!valueArg.isSet()) {
                out.format(fmt_remove, key);
                ShellUtils.getCurrentShell().removeProperty(key);
            } else {
                String value = valueArg.getValue();
                out.format(fmt_set, key, value);
                ShellUtils.getCurrentShell().setProperty(key, value);
            }
        } else {
            String key = keyArg.getValue();
            if (!valueArg.isSet()) {
View Full Code Here


                ShellUtils.getCurrentShell().setProperty(key, value);
            }
        } else {
            String key = keyArg.getValue();
            if (!valueArg.isSet()) {
                out.format(fmt_remove, key);
                System.getProperties().remove(key);
            } else {
                String value = valueArg.getValue();
                out.format(fmt_set, key, value);
                System.getProperties().setProperty(key, value);
View Full Code Here

            if (!valueArg.isSet()) {
                out.format(fmt_remove, key);
                System.getProperties().remove(key);
            } else {
                String value = valueArg.getValue();
                out.format(fmt_set, key, value);
                System.getProperties().setProperty(key, value);
            }
        }
    }
}
View Full Code Here

        icmpProtocol.addListener(this);
        try {
            int id_count = 0;
            int seq_count = 0;
            while (this.count != 0) {
                out.format(fmt_ping, dst, seq_count);

                if (!this.flood) {
                    this.wait = true;
                }
View Full Code Here

                        this.wait = false;
                    }
                    Thread.sleep(500);
                    synchronized (this) {
                        if (response) {
                            out.format(fmt_reply,
                                dst.toString(), hdr1.getDataLength(), hdr1.getTtl(), hdr2.getSeqNumber(), roundt);
                            response = false;
                        }
                    }
                }
View Full Code Here

            }
        } finally {
            icmpProtocol.removeListener(this);
        }
       
        out.format(fmt_stats, this.stat.getStatistics());
    }
   
    private long match(int id, int seq, Request r) {
        if (r != null && id == r.getId()) {
            return r.getTimestamp();
View Full Code Here

                    server.protocol == 6 ? str_tcp : str_udp,
                    server.port, getName(server.program));
                out.println();
            }
        } catch (OncRpcException e) {
            err.format(err_call, hostname);
            exit(1);
        } catch (UnknownHostException e) {
            err.format(err_host, hostname);
            exit(1);
        } catch (IOException e) {
View Full Code Here

                try {
                    final KeyboardInterpreter kbInt = mgr.createKeyboardInterpreter(layoutID);
                    out.format(fmt_set_interp, kb.getId(), kbInt.getClass().getName());
                    api.setKbInterpreter(kbInt);
                } catch (KeyboardInterpreterException ex) {
                    err.format(ex_set_interp, kb.getId(), ex.getLocalizedMessage());
                    // Re-throw the exception so that the shell can decide whether or not
                    // to print a stacktrace.
                    throw ex;
                }
            }
View Full Code Here

            out.println(str_enable);
        } else {
            // FIXME ... we shouldn't have to do this ...
            final boolean state = Unsafe.setKdbEnabled(false);
            Unsafe.setKdbEnabled(state);
            out.format(fmt_set, (state ? str_enabled : str_disabled));
        }       
    }
}
View Full Code Here

        String sss = "";
        if (dd > 1) {
            sss = "s";
        }
        out.format(fmt_time, dd, sss, hh, mm, ss);
    }
}
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.