code: private static int findFirstQuotable(byte[] data, int offset, int end) {
      while (offset < end) {
        switch (data[offset]) {
        case '<':
        case '>':
        case '&':
          return offset;
        default:
          offset += 1;
        }
      }
      return offset;
    }
docs: Find the next quotable character in the given array.
  @param data the bytes to look in
  @param offset the first index to look in
  @param end the index after the last one to look in
  @return the index of the quotable character or end if none was found