Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.java.addons;
 
 
 public class StringJavaAddons {
     @JRubyMethod
    public static IRubyObject to_java_bytes(ThreadContext contextIRubyObject self) {
        return JavaArrayUtilities.ruby_string_to_bytes(selfself);
    }
    
    @JRubyMethod(meta = true)
    public static IRubyObject from_java_bytes(ThreadContext contextIRubyObject selfIRubyObject bytes) {
        return JavaArrayUtilities.bytes_to_ruby_string(bytesbytes);
    }
    @JRubyMethod
    public static IRubyObject to_java_string(ThreadContext contextIRubyObject self) {
        return Java.getInstance(context.runtimeself.convertToString().asJavaString());
    }
New to GrepCode? Check out our FAQ X