Examples of checkCharReadable()


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

        fptr = getOpenFileChecked();

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

            if (fptr.READ_CHAR_PENDING()) return runtime.getFalse();
            if (fptr.READ_DATA_PENDING()) return runtime.getFalse();
            fptr.READ_CHECK(context);
            //        #if defined(RUBY_TEST_CRLF_ENVIRONMENT) || defined(_WIN32)
View Full Code Here

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

        OpenFile fptr = getOpenFileChecked();

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

            enc = fptr.inputEncoding(runtime);
            fptr.READ_CHECK(context);
            return fptr.getc(context, enc);
        } finally {
View Full Code Here

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

        fptr = getOpenFileChecked();

        boolean locked = fptr.lock();
        try {
            fptr.checkCharReadable(context);
            if (c.isNil()) return c;
            if (c instanceof RubyFixnum) {
                c = EncodingUtils.encUintChr(context, (int) ((RubyFixnum) c).getLongValue(), fptr.readEncoding(runtime));
            } else if (c instanceof RubyBignum) {
                c = EncodingUtils.encUintChr(context, (int) ((RubyBignum) c).getLongValue(), fptr.readEncoding(runtime));
View Full Code Here

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

        if (length.isNil()) {
            fptr = getOpenFileChecked();

            boolean locked = fptr.lock();
            try {
                fptr.checkCharReadable(context);
                return fptr.readAll(context, 0, str);
            } finally {
                if (locked) fptr.unlock();
            }
        }
View Full Code Here

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

        if (!block.isGiven()) return enumeratorize(context.runtime, this, "each_char");
        fptr = getOpenFileChecked();

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

            enc = fptr.inputEncoding(runtime);
            fptr.READ_CHECK(context);
            while (!(c = fptr.getc(context, enc)).isNil()) {
                block.yield(context, c);
View Full Code Here

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

        if (!block.isGiven()) return enumeratorize(context.runtime, this, methodName);
        fptr = getOpenFileChecked();

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

            fptr.READ_CHECK(context);
            if (fptr.needsReadConversion()) {
                fptr.SET_BINARY_MODE();
                for (;;) {
View Full Code Here

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

       
        OpenFile fptr = getOpenFileChecked();

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

            if (rs.isNil() && _limit < 0) {
                str = fptr.readAll(context, 0, context.nil);
                if (((RubyString) str).size() == 0) return context.nil;
            } else if (_limit == 0) {
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.