Examples of IOInputStream


Examples of org.jruby.util.IOInputStream

        }*/
        return new PrintStream(new IOOutputStream(getGlobalVariables().get("$stderr")));
    }

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

Examples of org.jruby.util.IOInputStream

        Ruby runtime = context.runtime;
       
        // FIXME? only supports Unicode, since we have to produces strings...
        StreamReader reader;
        if (target.respondsTo("read")) {
            reader = new StreamReader(new InputStreamReader(new IOInputStream(target)));
        } else {
            reader = new StreamReader(new StringReader(target.convertToString().asJavaString()));
        }
        Parser parser = new ParserImpl(reader);
        IRubyObject handler = getInstanceVariable("@handler");
View Full Code Here

Examples of org.jruby.util.IOInputStream

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

Examples of org.jruby.util.IOInputStream

        }
    }

    private static InputStream inputStream(ThreadContext context, IRubyObject in) {
        setBinmodeIfPossible(context, in);
        return new IOInputStream(in);
    }
View Full Code Here

Examples of org.jruby.util.IOInputStream

        }*/
        return new PrintStream(new IOOutputStream(getGlobalVariables().get("$stderr")));
    }

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

Examples of org.jruby.util.IOInputStream

            return new StreamReader(isr);
        }

        // fall back on IOInputStream, using default charset
        if (yaml.respondsTo("read")) {
            return new StreamReader(new InputStreamReader(new IOInputStream(yaml), Charset.defaultCharset()));
        } else {
            throw runtime.newTypeError(yaml, runtime.getIO());
        }
    }
View Full Code Here

Examples of org.jruby.util.IOInputStream

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

Examples of org.jruby.util.IOInputStream

    public IRubyObject initialize(IRubyObject stream) {
        realIo = stream;
        line = 0;
        position = 0;
        try {
            io = new com.jcraft.jzlib.GZIPInputStream(new IOInputStream(realIo),
                    512,
                    false); // don't close realIO
            // JRUBY-4502
            // CRuby expects to parse gzip header in 'new'.
            io.readHeader();
View Full Code Here

Examples of org.jruby.util.IOInputStream

        }*/
        return new PrintStream(new IOOutputStream(getGlobalVariables().get("$stderr")));
    }

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

Examples of org.jruby.util.IOInputStream

        }
    }

    private static InputStream inputStream(ThreadContext context, IRubyObject in) {
        setBinmodeIfPossible(context, in);
        return new IOInputStream(in);
    }
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.