Examples of IOOutputStream


Examples of org.jruby.util.IOOutputStream

    @JRubyMethod(visibility = PRIVATE)
    public IRubyObject initialize(ThreadContext context, IRubyObject io) {
        options = new DumperOptions();
        options.setIndent(2);
        emitter = new Emitter(new OutputStreamWriter(new IOOutputStream(io)), options);

        return context.nil;
    }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

        }

        @JRubyMethod(name = "to_outputstream")
        public static IRubyObject any_to_outputstream(ThreadContext context, IRubyObject self) {
            // using IOOutputStream may not be the most performance way, but it's easy.
            return JavaUtil.convertJavaToUsableRubyObject(context.getRuntime(), new IOOutputStream(self));
        }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

    }

    private static OutputStream outputStream(ThreadContext context, IRubyObject out) {
        setBinmodeIfPossible(context, out);
        return new IOOutputStream(out);
    }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

        if(null != os) {
            return new PrintStream(os);
        } else {
            return new PrintStream(new org.jruby.util.SwallowingOutputStream());
        }*/
        return new PrintStream(new IOOutputStream(getGlobalVariables().get("$stderr")));
    }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

    public InputStream getInputStream() {
        return new IOInputStream(getGlobalVariables().get("$stdin"));
    }

    public PrintStream getOutputStream() {
        return new PrintStream(new IOOutputStream(getGlobalVariables().get("$stdout")));
    }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

    }

    private IRubyObject initializeCommon(IRubyObject stream) {
        realIo = (RubyObject) stream;
        try {
            io = new com.jcraft.jzlib.GZIPOutputStream(new IOOutputStream(realIo, false, false), 512, false);
            return this;
        } catch (IOException ioe) {
            throw getRuntime().newIOErrorFromException(ioe);
        }
    }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

        if (emitter != null) throw context.runtime.newRuntimeError("already initialized emitter");

        Encoding encoding = PsychLibrary.YAMLEncoding.values()[(int)_encoding.convertToInteger().getLongValue()].encoding;
        Charset charset = context.runtime.getEncodingService().charsetForEncoding(encoding);

        emitter = new Emitter(new OutputStreamWriter(new IOOutputStream(io), charset), options);
    }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

        }

        @JRubyMethod(name = "to_outputstream")
        public static IRubyObject any_to_outputstream(ThreadContext context, IRubyObject self) {
            // using IOOutputStream may not be the most performance way, but it's easy.
            return JavaUtil.convertJavaToUsableRubyObject(context.runtime, new IOOutputStream(self));
        }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

        if(null != os) {
            return new PrintStream(os);
        } else {
            return new PrintStream(new org.jruby.util.SwallowingOutputStream());
        }*/
        return new PrintStream(new IOOutputStream(getGlobalVariables().get("$stderr")));
    }
View Full Code Here

Examples of org.jruby.util.IOOutputStream

    public InputStream getInputStream() {
        return new IOInputStream(getGlobalVariables().get("$stdin"));
    }

    public PrintStream getOutputStream() {
        return new PrintStream(new IOOutputStream(getGlobalVariables().get("$stdout")));
    }
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.