Examples of needsReadConversion()


Examples of org.jruby.util.io.OpenFile.needsReadConversion()

            } else if (c instanceof RubyBignum) {
                c = EncodingUtils.encUintChr(context, (int) ((RubyBignum) c).getLongValue(), fptr.readEncoding(runtime));
            } else {
                c = c.convertToString();
            }
            if (fptr.needsReadConversion()) {
                fptr.SET_BINARY_MODE();
                len = ((RubyString) c).size();
                //            #if SIZEOF_LONG > SIZEOF_INT
                //            if (len > INT_MAX)
                //                rb_raise(rb_eIOError, "ungetc failed");
View Full Code Here

Examples of org.jruby.util.io.OpenFile.needsReadConversion()

        boolean locked = fptr.lock();
        try {
            fptr.checkCharReadable(context);

            fptr.READ_CHECK(context);
            if (fptr.needsReadConversion()) {
                fptr.SET_BINARY_MODE();
                for (;;) {
                    fptr.makeReadConversion(context);
                    for (;;) {
                        if (fptr.cbuf.len != 0) {
View Full Code Here

Examples of org.jruby.util.io.OpenFile.needsReadConversion()

            } else if (_limit == 0) {
                return RubyString.newEmptyString(runtime, fptr.readEncoding(runtime));
            } else if (
                    rs == runtime.getGlobalVariables().getDefaultSeparator()
                            && _limit < 0
                            && !fptr.needsReadConversion()
                            && (enc = fptr.readEncoding(runtime)).isAsciiCompatible()) {
                fptr.NEED_NEWLINE_DECORATOR_ON_READ_CHECK();
                return fptr.getlineFast(context, enc, this);
            }
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.