@Override public void mark(final int readLimit) { get().mark(readLimit); }
/** * Install the hijacker. */ public static synchronized void install() { if (installed) { throw new IllegalStateException("Already installed"); } // Capture the current set of streams previous = new StreamSet(System.in, System.out, System.err); // Install our streams System.setIn(new DelegateInputStream()); System.setOut(new DelegateOutputStream(StreamSet.OutputType.OUT)); System.setErr(new DelegateOutputStream(StreamSet.OutputType.ERR)); installed = true; log.debug("Installed"); }
@Override public int available() throws IOException { return get().available(); }
@Override public int read() throws IOException { return get().read(); }
@Override public void close() throws IOException { get().close(); }
@Override public int read(final byte[] b) throws IOException { return get().read(b); }
@Override public boolean markSupported() { return get().markSupported(); } }
@Override public long skip(final long n) throws IOException { return get().skip(n); }
@Override public int read(final byte[] b, final int off, final int len) throws IOException { return get().read(b, off, len); }
@Override public void reset() throws IOException { get().reset(); }