本文整理了Java中org.jruby.Ruby.newConverterNotFoundError
方法的一些代码示例,展示了Ruby.newConverterNotFoundError
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.newConverterNotFoundError
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:newConverterNotFoundError
暂无
代码示例来源:origin: org.jruby/jruby-core
public static RaiseException econvOpenExc(ThreadContext context, byte[] sourceEncoding, byte[] destinationEncoding, int ecflags) {
String message = econvDescription(context, sourceEncoding, destinationEncoding, ecflags, "code converter not found (") + ")";
return context.runtime.newConverterNotFoundError(message);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public static RaiseException econvOpenExc(ThreadContext context, byte[] sourceEncoding, byte[] destinationEncoding, int ecflags) {
String message = econvDescription(context, sourceEncoding, destinationEncoding, ecflags, "code converter not found (") + ")";
return context.runtime.newConverterNotFoundError(message);
}
代码示例来源:origin: org.jruby/jruby-complete
public static RaiseException econvOpenExc(ThreadContext context, byte[] sourceEncoding, byte[] destinationEncoding, int ecflags) {
String message = econvDescription(context, sourceEncoding, destinationEncoding, ecflags, "code converter not found (") + ")";
return context.runtime.newConverterNotFoundError(message);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public static RaiseException econvOpenExc(ThreadContext context, byte[] sourceEncoding, byte[] destinationEncoding, int ecflags) {
String message = econvDescription(context, sourceEncoding, destinationEncoding, ecflags, "code converter not found (") + ")";
return context.runtime.newConverterNotFoundError(message);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private static Encoding getEncoding(Ruby runtime, IRubyObject toEnc) {
try {
return runtime.getEncodingService().getEncodingFromObject(toEnc);
} catch (Exception e) {
throw runtime.newConverterNotFoundError("code converter not found (" + toEnc.toString() + ")");
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private static Encoding getEncoding(Ruby runtime, IRubyObject toEnc) {
try {
return runtime.getEncodingService().getEncodingFromObject(toEnc);
} catch (Exception e) {
throw runtime.newConverterNotFoundError("code converter not found (" + toEnc.toString() + ")");
}
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(meta = true)
public static IRubyObject asciicompat_encoding(ThreadContext context, IRubyObject self, IRubyObject strOrEnc) {
Ruby runtime = context.runtime;
EncodingService encodingService = runtime.getEncodingService();
Encoding encoding = encodingService.getEncodingFromObjectNoError(strOrEnc);
if (encoding == null) {
return context.nil;
}
if (encoding.isAsciiCompatible()) {
return context.nil;
}
Encoding asciiCompat = NONASCII_TO_ASCII.get(encoding);
if (asciiCompat == null) {
throw runtime.newConverterNotFoundError("no ASCII compatible encoding found for " + strOrEnc);
}
return encodingService.convertEncodingToRubyEncoding(asciiCompat);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@JRubyMethod(compat = RUBY1_9, meta = true)
public static IRubyObject asciicompat_encoding(ThreadContext context, IRubyObject self, IRubyObject strOrEnc) {
Ruby runtime = context.runtime;
EncodingService encodingService = runtime.getEncodingService();
Encoding encoding = encodingService.getEncodingFromObjectNoError(strOrEnc);
if (encoding == null) {
return context.nil;
}
if (encoding.isAsciiCompatible()) {
return context.nil;
}
Encoding asciiCompat = NONASCII_TO_ASCII.get(encoding);
if (asciiCompat == null) {
throw runtime.newConverterNotFoundError("no ASCII compatible encoding found for " + strOrEnc);
}
return encodingService.convertEncodingToRubyEncoding(asciiCompat);
}
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod(meta = true)
public static IRubyObject asciicompat_encoding(ThreadContext context, IRubyObject self, IRubyObject strOrEnc) {
Ruby runtime = context.runtime;
EncodingService encodingService = runtime.getEncodingService();
Encoding encoding = encodingService.getEncodingFromObjectNoError(strOrEnc);
if (encoding == null) {
return context.nil;
}
if (encoding.isAsciiCompatible()) {
return context.nil;
}
Encoding asciiCompat = NONASCII_TO_ASCII.get(encoding);
if (asciiCompat == null) {
throw runtime.newConverterNotFoundError("no ASCII compatible encoding found for " + strOrEnc);
}
return encodingService.convertEncodingToRubyEncoding(asciiCompat);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@JRubyMethod(compat = RUBY1_9, meta = true)
public static IRubyObject asciicompat_encoding(ThreadContext context, IRubyObject self, IRubyObject strOrEnc) {
Ruby runtime = context.runtime;
EncodingService encodingService = runtime.getEncodingService();
Encoding encoding = encodingService.getEncodingFromObjectNoError(strOrEnc);
if (encoding == null) {
return context.nil;
}
if (encoding.isAsciiCompatible()) {
return context.nil;
}
Encoding asciiCompat = NONASCII_TO_ASCII.get(encoding);
if (asciiCompat == null) {
throw runtime.newConverterNotFoundError("no ASCII compatible encoding found for " + strOrEnc);
}
return encodingService.convertEncodingToRubyEncoding(asciiCompat);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
throw runtime.newConverterNotFoundError("code converter not found for " + encoding.toString());
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
throw runtime.newConverterNotFoundError("code converter not found for " + encoding.toString());
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
throw runtime.newConverterNotFoundError("code converter not found (" + srcEncoding + " to " + destEncoding + ")");
throw runtime.newConverterNotFoundError("code converter not found (" + srcEncoding + " to " + destEncoding + ")");
} else {
throw e;
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
throw runtime.newConverterNotFoundError("code converter not found (" + srcEncoding + " to " + destEncoding + ")");
throw runtime.newConverterNotFoundError("code converter not found (" + srcEncoding + " to " + destEncoding + ")");
} else {
throw e;
内容来源于网络,如有侵权,请联系作者删除!