private int parseTimestamp(final String path, int i) throws IllegalArgumentException {
    if (i >= path.length()) {
      return i;
    }
    long time0 = 0, time1 = 0;
    try {
      char c = 0;
      StringBuilder stamp = new StringBuilder();
      while (i < path.length()) {
        c = path.charAt(i);
        if (c == '/' || c == ',') {
          break;
        }
        stamp.append(c);
        i++;
      }
      try {
        time0 = Long.parseLong(URLDecoder.decode(stamp.toString(), HConstants.UTF8_ENCODING));
      } catch (NumberFormatException e) {
        throw new IllegalArgumentException(e);
      }
      if (c == ',') {
        stamp = new StringBuilder();
        i++;
        while (i < path.length() && ((c = path.charAt(i)) != '/')) {
          stamp.append(c);
          i++;
        }
        try {
          time1 = Long.parseLong(URLDecoder.decode(stamp.toString(), HConstants.UTF8_ENCODING));
        } catch (NumberFormatException e) {
          throw new IllegalArgumentException(e);
        }
      }
      if (c == '/') {
        i++;
      }
    } catch (IndexOutOfBoundsException e) {
      throw new IllegalArgumentException(e);
    } catch (UnsupportedEncodingException e) {
      // shouldn't happen
      throw new RuntimeException(e);
    }
    if (time1 != 0) {
      startTime = time0;
      endTime = time1;
    } else {
      endTime = time0;
      partialTimeRange = true;
    }
    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