Package org.kohsuke.stapler.framework.io

Examples of org.kohsuke.stapler.framework.io.ByteBuffer


        /**
         * Creates one that's backed by memory.
         */
        public static ListenerAndText forMemory(TaskAction context) {
            // StringWriter is synchronized
            ByteBuffer log = new ByteBuffer();

            return new ListenerAndText(
                new StreamTaskListener(log),
                new AnnotatedLargeText<TaskAction>(log,Charset.defaultCharset(),false,context)
            );
View Full Code Here


    @Override
    public AnnotatedLargeText<? extends FlowNode> getLogText() {
        try {
            getLogFile();
            if (!log.exists())
                return new AnnotatedLargeText<FlowNode>(new ByteBuffer(), getCharset(), !parent.isRunning(), parent);

            return new AnnotatedLargeText<FlowNode>(log, getCharset(), !parent.isRunning(), parent);
        } catch (IOException e) {
            ByteBuffer buf = new ByteBuffer();
            PrintStream ps;
            try {
                ps = new PrintStream(buf, false, "UTF-8");
            } catch (UnsupportedEncodingException x) {
                throw new AssertionError(x);
View Full Code Here

        /**
         * Creates one that's backed by memory.
         */
        public static ListenerAndText forMemory(TaskThread context) {
            // StringWriter is synchronized
            ByteBuffer log = new ByteBuffer();

            return new ListenerAndText(
                new StreamTaskListener(log),
                new AnnotatedLargeText<TaskThread>(log,Charset.defaultCharset(),false,context)
            );
View Full Code Here

TOP

Related Classes of org.kohsuke.stapler.framework.io.ByteBuffer

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.