Examples of newErrnoEBADFError()


Examples of org.jruby.Ruby.newErrnoEBADFError()

           
            // normal file descriptor..try to work with it
            ChannelDescriptor descriptor = socket.getDescriptorByFileno((int)((RubyFixnum)fd).getLongValue());
           
            if (descriptor == null) {
                throw ruby.newErrnoEBADFError();
            }
           
            Channel mainChannel = descriptor.getChannel();

            if (mainChannel instanceof SocketChannel) {
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEBADFError()

        } catch (PipeException pe) {
            throw runtime.newErrnoEPIPEError();
        } catch (IOException ex) {
            throw runtime.newIOErrorFromException(ex);
        } catch (BadDescriptorException ex) {
            throw runtime.newErrnoEBADFError();
        } catch (InvalidValueException e) {
            throw runtime.newErrnoEINVALError();
        }
       
        return JavaUtil.convertJavaToUsableRubyObject(context.getRuntime(), io.getInStream());
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEBADFError()

        } catch (PipeException pe) {
            throw runtime.newErrnoEPIPEError();
        } catch (IOException ex) {
            throw runtime.newIOErrorFromException(ex);
        } catch (BadDescriptorException ex) {
            throw runtime.newErrnoEBADFError();
        } catch (InvalidValueException e) {
            throw runtime.newErrnoEINVALError();
        }
       
        return JavaUtil.convertJavaToUsableRubyObject(context.getRuntime(), io.getOutStream());
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEBADFError()

            // normal file descriptor..try to work with it
            ChannelDescriptor descriptor = ChannelDescriptor.getDescriptorByFileno((int)((RubyFixnum)fd).getLongValue());

            if (descriptor == null) {
                throw ruby.newErrnoEBADFError();
            }

            Channel mainChannel = descriptor.getChannel();

            if (mainChannel instanceof SocketChannel) {
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEBADFError()

        } catch (InvalidValueException ex) {
            throw runtime.newErrnoEINVALError();
        } catch (EOFException e) {
            return runtime.newFixnum(-1);
        } catch (BadDescriptorException e) {
            throw runtime.newErrnoEBADFError();
        } catch (IOException e) {
            throw runtime.newIOErrorFromException(e);
        }
    }
}
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEBADFError()

        try {
            io.getOpenFile().checkReadable(context.getRuntime());
        } catch (IOException ex) {
            throw runtime.newIOErrorFromException(ex);
        } catch (BadDescriptorException ex) {
            throw runtime.newErrnoEBADFError();
        } catch (InvalidValueException e) {
            throw runtime.newErrnoEINVALError();
        }
       
        return JavaUtil.convertJavaToUsableRubyObject(context.getRuntime(), io.getInStream());
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEBADFError()

        try {
            io.getOpenFile().checkWritable(context.getRuntime());
        } catch (IOException ex) {
            throw runtime.newIOErrorFromException(ex);
        } catch (BadDescriptorException ex) {
            throw runtime.newErrnoEBADFError();
        } catch (InvalidValueException e) {
            throw runtime.newErrnoEINVALError();
        }
       
        return JavaUtil.convertJavaToUsableRubyObject(context.getRuntime(), io.getOutStream());
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEBADFError()

        } catch (InvalidValueException ex) {
            throw runtime.newErrnoEINVALError();
        } catch (EOFException e) {
            return runtime.newFixnum(-1);
        } catch (BadDescriptorException e) {
            throw runtime.newErrnoEBADFError();
        } catch (IOException e) {
            throw runtime.newIOErrorFromException(e);
        }
    }
}
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEBADFError()

            int intFD = (int)((RubyFixnum)fd).getLongValue();

            ChannelDescriptor descriptor = ChannelDescriptor.getDescriptorByFileno(intFD);

            if (descriptor == null) {
                throw runtime.newErrnoEBADFError();
            }

            RubySocket socket = (RubySocket)((RubyClass)socketClass).allocate();

            socket.initFieldsFromDescriptor(runtime, descriptor);
View Full Code Here

Examples of org.jruby.Ruby.newErrnoEBADFError()

                    });

            return runtime.newArray(result, addressArray);

        } catch (BadDescriptorException e) {
            throw runtime.newErrnoEBADFError();
        }
    }

    @JRubyMethod
    public IRubyObject recvfrom(ThreadContext context, IRubyObject _length, IRubyObject _flags) {
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.