code: private static void getResPathKeys(String path, int num, String[] keys, int start) {
          if (num == 0) {
              return;
          }
          if (num == 1) {
              keys[start] = path;
              return;
          }
          int i = 0;
          for (;;) {
              int j = path.indexOf(RES_PATH_SEP_CHAR, i);
              assert j >= i;
              keys[start++] = path.substring(i, j);
              if (num == 2) {
                  assert path.indexOf(RES_PATH_SEP_CHAR, j + 1) < 0;
                  keys[start] = path.substring(j + 1);
                  break;
              } else {
                  i = j + 1;
                  --num;
              }
          }
      }
docs: Fills some of the keys array (from start) with the num keys from the path string.
  
  @param path path string
  @param num must be {@link #countPathKeys(String)}
  @param keys
  @param start index where the first path key is stored