Examples of IOInputStream


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

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

Examples of org.jruby.util.IOInputStream

        realIo = stream;

        try {
            // don't close realIO
            ioInputStream = new IOInputStream(realIo);
            io = new GZIPInputStream(ioInputStream, 512, false);

            // JRUBY-4502
            // CRuby expects to parse gzip header in 'new'.
            io.readHeader();
View Full Code Here

Examples of org.jruby.util.IOInputStream

        } else {
          // use the default options RECOVER | NONET
          options = new ParserContext.Options(2048 | 1);
        }

        InputStream in = new UncloseableInputStream(new IOInputStream(args[0]));
        reader.setInput(context, in, url, options);
        return reader;
    }
View Full Code Here

Examples of org.jruby.util.IOInputStream

        } else {
          // use the default options RECOVER | NONET
          options = new ParserContext.Options(2048 | 1);
        }
        IRubyObject stringIO = NokogiriService.getNokogiriClassCache(context.getRuntime()).get("StringIO").newInstance(context, args[0], Block.NULL_BLOCK);
        InputStream in = new UncloseableInputStream(new IOInputStream(stringIO));
        reader.setInput(context, in, url, options);
        return reader;
    }
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.