private static void checkSeparator(String separator) throws XMPException {
  boolean haveSemicolon=false;
  for (int i=0; i < separator.length(); i++) {
    int charKind=classifyCharacter(separator.charAt(i));
    if (charKind == UCK_SEMICOLON) {
      if (haveSemicolon) {
        throw new XMPException("Separator can have only one semicolon",XMPError.BADPARAM);
      }
      haveSemicolon=true;
    }
 else     if (charKind != UCK_SPACE) {
      throw new XMPException("Separator can have only spaces and one semicolon",XMPError.BADPARAM);
    }
  }
  if (!haveSemicolon) {
    throw new XMPException("Separator must have one semicolon",XMPError.BADPARAM);
  }
}

private static void checkSeparator ( String separator ) throws XMPException { boolean haveSemicolon = false ; for ( int i = 0 ; i < separator . length ( ) ; i ++ ) { int charKind = classifyCharacter ( separator . charAt ( i ) ) ; if ( charKind == UCK_SEMICOLON ) { if ( haveSemicolon ) { throw new XMPException ( "Separator can have only one semicolon" , XMPError . BADPARAM ) ; } haveSemicolon = true ; } else if ( charKind != UCK_SPACE ) { throw new XMPException ( "Separator can have only spaces and one semicolon" , XMPError . BADPARAM ) ; } } if ( ! haveSemicolon ) { throw new XMPException ( "Separator must have one semicolon" , XMPError . BADPARAM ) ; } }
make sure the separator is ok . it must be one semicolon surrounded by zero or more spaces . any of the recognized semicolons or spaces are allowed .
