/** * Find a non-special encoding, raising argument error if it does not exist. * * @param name the name of the encoding to look up * @return the Encoding object found, or raises ArgumentError */ public Encoding findEncodingWithError(ByteList name) { return findEntryWithError(name).getEncoding(); }
/** * Find a non-special encoding, raising argument error if it does not exist. * * @param name the name of the encoding to look up * @return the Encoding object found, or raises ArgumentError */ public Encoding findEncodingWithError(ByteList name) { return findEntryWithError(name).getEncoding(); }
/** * Find a non-special encoding, raising argument error if it does not exist. * * @param name the name of the encoding to look up * @return the Encoding object found, or raises ArgumentError */ public Encoding findEncodingWithError(ByteList name) { return findEntryWithError(name).getEncoding(); }
/** * Find a non-special encoding, raising argument error if it does not exist. * * @param name the name of the encoding to look up * @return the Encoding object found, or raises ArgumentError */ public Encoding findEncodingWithError(ByteList name) { return findEntryWithError(name).getEncoding(); }
/** * Find an encoding given a Ruby object, coercing it to a String in the process. * * @param str the object to coerce and use to look up encoding. The coerced String * must be ASCII-compatible. * @return the Encoding object found, nil (for internal), or raises ArgumentError */ public Entry findEntry(IRubyObject str) { ByteList name = str.convertToString().getByteList(); checkAsciiEncodingName(name); SpecialEncoding special = SpecialEncoding.valueOf(name); if (special != null) { return findEntryFromEncoding(special.toEncoding(runtime)); } return findEntryWithError(name); }
/** * Find an encoding given a Ruby object, coercing it to a String in the process. * * @param str the object to coerce and use to look up encoding. The coerced String * must be ASCII-compatible. * @return the Encoding object found, nil (for internal), or raises ArgumentError */ public Entry findEntry(IRubyObject str) { ByteList name = str.convertToString().getByteList(); checkAsciiEncodingName(name); SpecialEncoding special = SpecialEncoding.valueOf(name); if (special != null) { return findEntryFromEncoding(special.toEncoding(runtime)); } return findEntryWithError(name); }
/** * Find an encoding given a Ruby object, coercing it to a String in the process. * * @param str the object to coerce and use to look up encoding. The coerced String * must be ASCII-compatible. * @return the Encoding object found, nil (for internal), or raises ArgumentError */ public Entry findEntry(IRubyObject str) { ByteList name = str.convertToString().getByteList(); checkAsciiEncodingName(name); SpecialEncoding special = SpecialEncoding.valueOf(name); if (special != null) { return findEntryFromEncoding(special.toEncoding(runtime)); } return findEntryWithError(name); }
/** * Find an encoding given a Ruby object, coercing it to a String in the process. * * @param str the object to coerce and use to look up encoding. The coerced String * must be ASCII-compatible. * @return the Encoding object found, nil (for internal), or raises ArgumentError */ public Entry findEntry(IRubyObject str) { ByteList name = str.convertToString().getByteList(); checkAsciiEncodingName(name); SpecialEncoding special = SpecialEncoding.valueOf(name); if (special != null) { return findEntryFromEncoding(special.toEncoding(runtime)); } return findEntryWithError(name); }