Esempio n. 1
0
 public RubyEncoding getEncoding(Encoding enc) {
   int index = enc.getIndex();
   RubyEncoding rubyEncoding;
   if (index < encodingIndex.length && (rubyEncoding = encodingIndex[index]) != null) {
     return rubyEncoding;
   }
   enc = loadEncoding(new ByteList(enc.getName(), false));
   return encodingIndex[enc.getIndex()];
 }
Esempio n. 2
0
 private Entry findEntryFromEncoding(Encoding e) {
   if (e == null) return null;
   return findEncodingEntry(new ByteList(e.getName()));
 }
Esempio n. 3
0
 private RubyEncoding(Ruby runtime, Encoding encoding) {
   super(runtime, runtime.getEncoding());
   this.name = new ByteList(encoding.getName());
   this.isDummy = false;
   this.encoding = encoding;
 }