Exit Full View

Feather2 / feather2-runtime / src / main / java / uk / co / nickthecoder / feather / runtime / FeatherSystem.java

package uk.co.nickthecoder.feather.runtime;

import java.io.InputStream;
import java.io.PrintStream;

/**
 * A version of java.lang.System, which excludes fields/methods which could be considered dangerous.
 */
final public class FeatherSystem {

    private FeatherSystem() {
    }

    public static InputStream getIn() {
        return System.in;
    }

    public static PrintStream getOut() {
        return System.out;
    }

    public static PrintStream getErr() {
        return System.err;
    }

    public static long currentTimeMillis() {
        return System.currentTimeMillis();
    }

    public static long nanoTime() {
        return System.nanoTime();
    }

    public static String lineSeparator() {
        return System.lineSeparator();
    }

}