private static int findEndOfTag(String markup,int startPos){
  int idx=markup.indexOf(CHAR_GREATER_THAN,startPos);
  return idx == -1 ? markup.length() : idx + 1;
}

private static int findEndOfTag ( String markup , int startPos ) { int idx = markup . indexOf ( CHAR_GREATER_THAN , startPos ) ; return idx == - 1 ? markup . length ( ) : idx + 1 ; }
find end of tag ( & gt ; ) . the position returned is the position of the & gt ; plus one ( exclusive ) .
