code: public byte[] toByteArray(int start, int end) {
          return Arrays.copyOfRange(value, start + offset, end + offset);
      }
docs: Converts a subset of this string to a byte array.
  The subset is defined by the range [{@code start}, {@code end}).