public IRubyObject[] getEncodingList() {
return encodingList;
}
public Encoding loadEncoding(ByteList name) {
Entry entry = findEncodingOrAliasEntry(name);
if (entry == null) return null;
Encoding enc = entry.getEncoding(); // load the encoding
int index = enc.getIndex();
if (index >= encodingIndex.length) {
RubyEncoding tmp[] = new RubyEncoding[index + 4];
System.arraycopy(encodingIndex, 0, tmp, 0, encodingIndex.length);
encodingIndex = tmp;
}
encodingIndex[index] = (RubyEncoding)encodingList[entry.getIndex()];
return enc;
}