Esempio n. 1
0
 public Btrie_fast_mgr Add(byte[] key, Object val) {
   if (val == null)
     throw Err_.new_("null objects cannot be registered").Add("key", String_.new_u8(key));
   int key_len = key.length;
   int key_end = key_len - 1;
   ByteTrieItm_fast cur = root;
   for (int i = 0; i < key_len; i++) {
     byte b = key[i];
     ByteTrieItm_fast nxt = cur.Ary_find(b);
     if (nxt == null) nxt = cur.Ary_add(b, null);
     if (i == key_end) nxt.Val_set(val);
     cur = nxt;
   }
   return this;
 }
 public void Exec() {
   if (String_.Eq(text, "") && append) return; // no change; don't bother writing to disc
   IoEnginePool.Instance.Get_by(url.Info().EngineKey()).SaveFilText_api(this);
 }
 public String To_str() {
   return String_.Concat_any("IOMATCH ", pattern);
 }