Package java.io

Examples of java.io.PrintWriter.format()


        if (test) {
            if (maxTestLevel == -1) {
                err.println(err_no_test);
                exit(1);
            } else if (maxTestLevel < level) {
                err.format(err_test_opt, maxTestLevel);
                exit(1);
            }
        } else if (maxNontestLevel < level) {
            err.format(err_opt, maxNontestLevel);
            exit(1);
View Full Code Here


            } else if (maxTestLevel < level) {
                err.format(err_test_opt, maxTestLevel);
                exit(1);
            }
        } else if (maxNontestLevel < level) {
            err.format(err_opt, maxNontestLevel);
            exit(1);
        }
        final long start = System.currentTimeMillis();
        final int count = type.disassemble(methodName, level, test, out);
        final long end = System.currentTimeMillis();
View Full Code Here

            if (udp) {
                final Logger root = Logger.getRootLogger();
                root.addAppender(new RemoteAppender(remoteOut, null));
            }
        } catch (ConnectException ex) {
            err.format(err_connect, ex.getLocalizedMessage());
            exit(1);
        } catch (UnknownHostException ex) {
            err.format(err_host, ex.getLocalizedMessage());
            exit(1);
        }
View Full Code Here

            }
        } catch (ConnectException ex) {
            err.format(err_connect, ex.getLocalizedMessage());
            exit(1);
        } catch (UnknownHostException ex) {
            err.format(err_host, ex.getLocalizedMessage());
            exit(1);
        }
    }
   
    private OutputStream createTCPOutputStream(InetAddress addr, int port) throws IOException {
View Full Code Here

            mainMethod.setAccessible(true);
           
            String[] mainArgs = argArgs.isSet() ? argArgs.getValues() : new String[0];
            mainMethod.invoke(null, new Object[]{mainArgs});
        } catch (ClassNotFoundException ex) {
            err.format(err_no_class, argClass.getValue());
            exit(1);
        } catch (NoSuchMethodException ex) {
            err.format(err_no_method, argClass.getValue());
            exit(1);
        } catch (InvocationTargetException ex) {
View Full Code Here

            mainMethod.invoke(null, new Object[]{mainArgs});
        } catch (ClassNotFoundException ex) {
            err.format(err_no_class, argClass.getValue());
            exit(1);
        } catch (NoSuchMethodException ex) {
            err.format(err_no_method, argClass.getValue());
            exit(1);
        } catch (InvocationTargetException ex) {
            // We unwrap and rethrow any exceptions that were thrown by 'invoke'.  It is
            // up to the shell to print a stacktrace ... or not.
            Throwable t = ex.getTargetException();
View Full Code Here

    @Override
    public void execute() {
        final org.jnode.vm.facade.Vm vm = VmUtils.getVm();
        if (vm != null && !vm.isBootstrap()) {
            PrintWriter out = getOutput().getPrintWriter();
            out.format(fmt_vm, vm.getVersion());
            VmUtils.dumpStatistics(out);
            vm.getSharedStatics().dumpStatistics(out);
            VmUtils.getVm().getHeapManager().dumpStatistics(out);
            final SecurityManager sm = System.getSecurityManager();
            out.format(fmt_sm, sm);
View Full Code Here

            out.format(fmt_vm, vm.getVersion());
            VmUtils.dumpStatistics(out);
            vm.getSharedStatics().dumpStatistics(out);
            VmUtils.getVm().getHeapManager().dumpStatistics(out);
            final SecurityManager sm = System.getSecurityManager();
            out.format(fmt_sm, sm);
            List<VmProcessor> processors = vm.getProcessors();
            for (VmProcessor cpu : processors) {
                out.format(fmt_proc, processors.indexOf(cpu), cpu.getIdString());
                cpu.dumpStatistics(out);
            }
View Full Code Here

            VmUtils.getVm().getHeapManager().dumpStatistics(out);
            final SecurityManager sm = System.getSecurityManager();
            out.format(fmt_sm, sm);
            List<VmProcessor> processors = vm.getProcessors();
            for (VmProcessor cpu : processors) {
                out.format(fmt_proc, processors.indexOf(cpu), cpu.getIdString());
                cpu.dumpStatistics(out);
            }
            if (argReset.isSet()) {
                VmUtils.resetCounters();
            }
View Full Code Here

            VmUtils.getVm().getHeapManager().setHeapFlags(flags);
        } else if (argShow.isSet()) {
            showFlags(VmUtils.getVm().getHeapManager().getHeapFlags(), out);
        } else {
            final Runtime rt = Runtime.getRuntime();
            out.format(fmt_out, str_mem_size, NumberUtils.toBinaryByte(rt.totalMemory()));
            out.format(fmt_out, str_mem_free, NumberUtils.toBinaryByte(rt.freeMemory()));

            out.println(str_start);
            long start = System.currentTimeMillis();
            rt.gc();
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.