}
return Character.valueOf('\0');
} else if (javaClass == String.class) {
RubyString rubyString = (RubyString) rubyObject.callMethod(context, "to_s");
ByteList bytes = rubyString.getByteList();
return RubyEncoding.decodeUTF8(bytes.getUnsafeBytes(), bytes.begin(), bytes.length());
} else if (javaClass == ByteList.class) {
return rubyObject.convertToString().getByteList();
} else if (javaClass == BigInteger.class) {
if (rubyObject instanceof RubyBignum) {
return ((RubyBignum)rubyObject).getValue();