private int run(){
  if (cur == -1) {
    return -1;
  }
  boolean leaf=false;
  while (true) {
    while (cur != 0) {
      if (sc[cur] == 0xFFFF) {
        leaf=true;
        break;
      }
      ns.push(new Item((char)cur,'\u0000'));
      if (sc[cur] == 0) {
        leaf=true;
        break;
      }
      cur=lo[cur];
    }
    if (leaf) {
      break;
    }
    cur=up();
    if (cur == -1) {
      return -1;
    }
  }
  StringBuilder buf=new StringBuilder(ks.toString());
  if (sc[cur] == 0xFFFF) {
    int p=lo[cur];
    while (kv.get(p) != 0) {
      buf.append(kv.get(p++));
    }
  }
  curkey=buf.toString();
  return 0;
}

private int run ( ) { if ( cur == - 1 ) { return - 1 ; } boolean leaf = false ; while ( true ) { while ( cur != 0 ) { if ( sc [ cur ] == 0xFFFF ) { leaf = true ; break ; } ns . push ( new Item ( ( char ) cur , '' ) ) ; if ( sc [ cur ] == 0 ) { leaf = true ; break ; } cur = lo [ cur ] ; } if ( leaf ) { break ; } cur = up ( ) ; if ( cur == - 1 ) { return - 1 ; } } StringBuilder buf = new StringBuilder ( ks . toString ( ) ) ; if ( sc [ cur ] == 0xFFFF ) { int p = lo [ cur ] ; while ( kv . get ( p ) != 0 ) { buf . append ( kv . get ( p ++ ) ) ; } } curkey = buf . toString ( ) ; return 0 ; }
traverse the tree to find next key
