Package henplus

Examples of henplus.OutputDevice


    /**
     * combine the current output from the stack with the given output, use this as current output and return it.
     */
    private OutputDevice openStackedDevice(final Stack<OutputDevice> stack, final OutputDevice newOut) {
        final OutputDevice origOut = stack.peek();
        final OutputDevice outDevice = new StackedDevice(origOut, newOut);
        stack.push(outDevice);
        return outDevice;
    }
View Full Code Here


    /**
     * close the top device on the stack and return the previous.
     */
    private OutputDevice closeStackedDevice(final Stack<OutputDevice> stack) {
        final OutputDevice out = stack.pop();
        out.close();
        return stack.peek();
    }
View Full Code Here

        return stack.peek();
    }

    private void openSpool(final String filename) throws IOException {
        // open file
        final OutputDevice spool = new PrintStreamOutputDevice(new PrintStream(new FileOutputStream(filename)));
        HenPlus.getInstance().setOutput(openStackedDevice(_outStack, spool), openStackedDevice(_msgStack, spool));
        HenPlus.msg().println("-- open spool at " + new Date());
    }
View Full Code Here

TOP

Related Classes of henplus.OutputDevice

Copyright © 2018 www.massapicom. 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.