Examples of clearerr()


Examples of org.jruby.util.io.Stream.clearerr()

                boolean update = false;
               
                while (true) {
                    do {
                        readCheck(readStream);
                        readStream.clearerr();
                       
                        try {
                            n = readStream.getline(buf, (byte) newline);
                            c = buf.length() > 0 ? buf.get(buf.length() - 1) & 0xff : -1;
                        } catch (EOFException e) {
View Full Code Here

Examples of org.jruby.util.io.Stream.clearerr()

        ByteList buf = new ByteList(0);
        boolean update = false;
        do {
            readCheck(readStream);
            readStream.clearerr();
            int n;
            try {
                n = readStream.getline(buf, (byte) delim);
                c = buf.length() > 0 ? buf.get(buf.length() - 1) & 0xff : -1;
            } catch (EOFException e) {
View Full Code Here

Examples of org.jruby.util.io.Stream.clearerr()

            myOpenFile.setReadBuffered();

            Stream stream = myOpenFile.getMainStream();
           
            readCheck(stream);
            stream.clearerr();
       
            int c = myOpenFile.getMainStream().fgetc();
           
            if (c == -1) {
                // TODO: check for ferror, clear it, and try once more up above readCheck
View Full Code Here

Examples of org.jruby.util.io.Stream.clearerr()

                    boolean limitReached = false;

                    while (true) {
                        do {
                            readCheck(readStream);
                            readStream.clearerr();

                            try {
                                runtime.getCurrentContext().getThread().beforeBlockingCall();
                                if (limit == -1) {
                                    n = readStream.getline(buf, (byte) newline);
View Full Code Here

Examples of org.jruby.util.io.Stream.clearerr()

        ByteList buf = cache != null ? cache.allocate(0) : new ByteList(0);
        try {
            boolean update = false;
            do {
                readCheck(readStream);
                readStream.clearerr();
                int n;
                try {
                    runtime.getCurrentContext().getThread().beforeBlockingCall();
                    n = readStream.getline(buf, (byte) delim);
                    c = buf.length() > 0 ? buf.get(buf.length() - 1) & 0xff : -1;
View Full Code Here

Examples of org.jruby.util.io.Stream.clearerr()

            Stream stream = myOpenFile.getMainStreamSafe();
           
            readCheck(stream);
            waitReadable(stream);
            stream.clearerr();
           
            return myOpenFile.getMainStreamSafe().fgetc();
        } catch (InvalidValueException ex) {
            throw getRuntime().newErrnoEINVALError();
        } catch (BadDescriptorException e) {
View Full Code Here

Examples of org.jruby.util.io.Stream.clearerr()

            rest -= buf.length();
        }
        while (rest > 0) {
            waitReadable(stream);
            openFile.checkClosed(getRuntime());
            stream.clearerr();
            ByteList newBuffer = blockingFRead(stream, thread, rest);
            if (newBuffer == null) {
                // means EOF
                break;
            }
View Full Code Here

Examples of org.jruby.util.io.Stream.clearerr()

                    if (is19) makeReadConversion(context);
                   
                    while (true) {
                        do {
                            readCheck(readStream);
                            readStream.clearerr();

                            try {
                                runtime.getCurrentContext().getThread().beforeBlockingCall();
                                if (limit == -1) {
                                    n = readStream.getline(buf, (byte) newline);
View Full Code Here

Examples of org.jruby.util.io.Stream.clearerr()

        ByteList buf = cache != null ? cache.allocate(0) : new ByteList(0);
        try {
            boolean update = false;
            do {
                readCheck(readStream);
                readStream.clearerr();
                int n;
                try {
                    runtime.getCurrentContext().getThread().beforeBlockingCall();
                    n = readStream.getline(buf, (byte) delim);
                    c = buf.length() > 0 ? buf.get(buf.length() - 1) & 0xff : -1;
View Full Code Here

Examples of org.jruby.util.io.Stream.clearerr()

            Stream stream = myOpenFile.getMainStreamSafe();
           
            readCheck(stream);
            waitReadable(stream);
            stream.clearerr();
           
            int c = stream.fgetc();
       
            if (c == -1) {
                // CRuby checks ferror(f) and retry getc for non-blocking IO
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.