Package java.io

Examples of java.io.PrintWriter.format()


            // entire system if we do it at a point where the application thread is executing
            // a method that is updating OS data structures.
            t.stop(new ThreadDeath());
            out.format(fmt_killed, threadId);
        } else {
            out.format(fmt_not_found, threadId);
            exit(1);
        }
    }

    /**
 
View Full Code Here


     * Execute this command
     */
    public void execute() throws Exception {
        PrintWriter out = getOutput().getPrintWriter();
        final Runtime rt = Runtime.getRuntime();
        out.format(fmt_info, str_total, NumberUtils.toBinaryByte(rt.totalMemory()));
        out.format(fmt_info, str_used, NumberUtils.toBinaryByte(rt.totalMemory() - rt.freeMemory()));
        out.format(fmt_info, str_free, NumberUtils.toBinaryByte(rt.freeMemory()));
    }
}
View Full Code Here

     */
    public void execute() throws Exception {
        PrintWriter out = getOutput().getPrintWriter();
        final Runtime rt = Runtime.getRuntime();
        out.format(fmt_info, str_total, NumberUtils.toBinaryByte(rt.totalMemory()));
        out.format(fmt_info, str_used, NumberUtils.toBinaryByte(rt.totalMemory() - rt.freeMemory()));
        out.format(fmt_info, str_free, NumberUtils.toBinaryByte(rt.freeMemory()));
    }
}
View Full Code Here

    public void execute() throws Exception {
        PrintWriter out = getOutput().getPrintWriter();
        final Runtime rt = Runtime.getRuntime();
        out.format(fmt_info, str_total, NumberUtils.toBinaryByte(rt.totalMemory()));
        out.format(fmt_info, str_used, NumberUtils.toBinaryByte(rt.totalMemory() - rt.freeMemory()));
        out.format(fmt_info, str_free, NumberUtils.toBinaryByte(rt.freeMemory()));
    }
}
View Full Code Here

            Locale locale = findLocale(language, country, variant);
            if (locale == null) {
                getError().getPrintWriter().format(err_no_locale, language, country, variant);
                exit(1);
            }
            out.format(fmt_set, formatLocale(locale));
            Locale.setDefault(locale);
        } else if (argList.isSet()) {
            listLocales(out);
        } else {
            out.format(fmt_get, formatLocale(Locale.getDefault()));
View Full Code Here

            out.format(fmt_set, formatLocale(locale));
            Locale.setDefault(locale);
        } else if (argList.isSet()) {
            listLocales(out);
        } else {
            out.format(fmt_get, formatLocale(Locale.getDefault()));
        }
    }
   
    /**
     * List the available Locales in alphabetical order
View Full Code Here

        if (test) {
            if (maxTestLevel == -1) {
                err.println(err_no_test);
                exit(1);
            } else if (maxTestLevel < level) {
                err.format(err_opt_test, 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_opt_test, maxTestLevel);
                exit(1);
            }
        } else if (maxNontestLevel < level) {
            err.format(err_opt, maxNontestLevel);
            exit(1);
        }

        final ClassLoader cl = Thread.currentThread().getContextClassLoader();
        final Class<?> cls;
View Full Code Here

            final long start = System.currentTimeMillis();
            final int count = type.compileRuntime(level, test);
            final long end = System.currentTimeMillis();
            out.format(fmt_out, count, (end - start));
        } catch (ClassNotFoundException ex) {
            err.format(err_no_class, className);
            exit(1);
        }
    }
}
View Full Code Here

        final ClassLoader cl = Thread.currentThread().getContextClassLoader();
        Class<?> cls;
        try {
            cls = cl.loadClass(className);
        } catch (ClassNotFoundException ex) {
            err.format(err_no_class, className);
            exit(1);
            // not reached
            return
        }
        final VmType<?> type = VmType.fromClass((Class<?>) cls);
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.