Examples of checkClosed()


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

            }
           
            // TODO: Ruby locks the string here
           
            context.getThread().beforeBlockingCall();
            myOpenFile.checkClosed(getRuntime());
           
            // TODO: Ruby re-checks that the buffer string hasn't been modified
           
            int bytesRead = myOpenFile.getMainStream().getDescriptor().read(len, str.getByteList());
           
View Full Code Here

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

            if (myOpenFile.isWriteBuffered()) {
                runtime.getWarnings().warn(ID.SYSWRITE_BUFFERED_IO, "syswrite for buffered IO");
            }
           
            if (!writeStream.getDescriptor().isWritable()) {
                myOpenFile.checkClosed(runtime);
            }
           
            int read = writeStream.getDescriptor().write(string.getByteList());
           
            if (read == -1) {
View Full Code Here

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

            if (c != -1) {
                myOpenFile.getMainStream().ungetc(c);
                return runtime.getFalse();
            }
           
            myOpenFile.checkClosed(runtime);
           
            myOpenFile.getMainStream().clearerr();
           
            return runtime.getTrue();
        } catch (PipeException ex) {
View Full Code Here

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

            if (myOpenFile.isWriteBuffered()) {
                runtime.getWarnings().warn(ID.SYSWRITE_BUFFERED_IO, "syswrite for buffered IO");
            }
           
            if (!writeStream.getDescriptor().isWritable()) {
                myOpenFile.checkClosed(runtime);
            }
           
            context.getThread().beforeBlockingCall();
            int read = writeStream.getDescriptor().write(string.getByteList());
           
View Full Code Here

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

            if (c != -1) {
                myOpenFile.getMainStreamSafe().ungetc(c);
                return runtime.getFalse();
            }
           
            myOpenFile.checkClosed(runtime);
           
            myOpenFile.getMainStreamSafe().clearerr();
           
            return runtime.getTrue();
        } catch (InvalidValueException ex) {
View Full Code Here

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

            }
           
            // TODO: Ruby locks the string here
           
            waitReadable(myOpenFile.getMainStreamSafe());
            myOpenFile.checkClosed(getRuntime());

            // We don't check RubyString modification since JRuby doesn't have
            // GIL. Other threads are free to change anytime.

            int bytesRead = myOpenFile.getMainStreamSafe().getDescriptor().read(len, str.getByteList());
View Full Code Here

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

        }

        Ruby runtime = context.getRuntime();
        try {
            OpenFile openFile = ((RubyIO) src).getOpenFile();
            openFile.checkClosed(runtime);
            openFile.checkReadable(runtime);

            ChannelStream stream = (ChannelStream) openFile.getMainStreamSafe();

            ByteBuffer buffer = ((AbstractMemory) dst).getMemoryIO().asByteBuffer();
View Full Code Here

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

        }

        Ruby runtime = context.runtime;
        try {
            OpenFile openFile = ((RubyIO) src).getOpenFile();
            openFile.checkClosed(runtime);
            openFile.checkReadable(runtime);

            ChannelStream stream = (ChannelStream) openFile.getMainStreamSafe();

            ByteBuffer buffer = ((AbstractMemory) dst).getMemoryIO().asByteBuffer();
View Full Code Here

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

            if (myOpenFile.isWriteBuffered()) {
                runtime.getWarnings().warn(ID.SYSWRITE_BUFFERED_IO, "syswrite for buffered IO");
            }
           
            if (!writeStream.getDescriptor().isWritable()) {
                myOpenFile.checkClosed(runtime);
            }
           
            context.getThread().beforeBlockingCall();
            int read = writeStream.getDescriptor().write(string.getByteList());
           
View Full Code Here

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

            if (c != -1) {
                myOpenFile.getMainStreamSafe().ungetc(c);
                return runtime.getFalse();
            }
           
            myOpenFile.checkClosed(runtime);
           
            myOpenFile.getMainStreamSafe().clearerr();
           
            return runtime.getTrue();
        } catch (InvalidValueException ex) {
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.