private int parseRowKeys(final String path, int i) throws IllegalArgumentException {
    String startRow = null, endRow = null;
    try {
      StringBuilder sb = new StringBuilder();
      char c;
      while (i < path.length() && (c = path.charAt(i)) != '/') {
        sb.append(c);
        i++;
      }
      i++;
      String row = startRow = sb.toString();
      int idx = startRow.indexOf(',');
      if (idx != -1) {
        startRow = URLDecoder.decode(row.substring(0, idx), HConstants.UTF8_ENCODING);
        endRow = URLDecoder.decode(row.substring(idx + 1), HConstants.UTF8_ENCODING);
      } else {
        startRow = URLDecoder.decode(row, HConstants.UTF8_ENCODING);
      }
    } catch (IndexOutOfBoundsException e) {
      throw new IllegalArgumentException(e);
    } catch (UnsupportedEncodingException e) {
      throw new RuntimeException(e);
    }
    // HBase does not support wildcards on row keys so we will emulate a
    // suffix glob by synthesizing appropriate start and end row keys for
    // table scanning
    if (startRow.charAt(startRow.length() - 1) == '*') {
      if (endRow != null)
        throw new IllegalArgumentException("invalid path: start row " + "specified with wildcard");
      this.row = Bytes.toBytes(startRow.substring(0, startRow.lastIndexOf("*")));
      this.endRow = new byte[this.row.length + 1];
      System.arraycopy(this.row, 0, this.endRow, 0, this.row.length);
      this.endRow[this.row.length] = (byte) 255;
    } else {
      this.row = Bytes.toBytes(startRow.toString());
      if (endRow != null) {
        this.endRow = Bytes.toBytes(endRow.toString());
      }
    }
    return i;
  }
Parses a path based row/column/timestamp specification into its component elements.
<p>
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowSpec.java