/** * Set the subtype for this object to the given String. * * @param sub the MIME subtype * @exception MimeTypeParseException if the subtype * is not a valid token */ public void setSubType(String sub) throws MimeTypeParseException { // check to see if sub is valid if (!isValidToken(subType)) throw new MimeTypeParseException("Sub type is invalid."); subType = sub.toLowerCase(Locale.ENGLISH); }
/** * Set the primary type for this object to the given String. * * @param primary the primary MIME type * @exception MimeTypeParseException if the primary type * is not a valid token */ public void setPrimaryType(String primary) throws MimeTypeParseException { // check to see if primary is valid if (!isValidToken(primaryType)) throw new MimeTypeParseException("Primary type is invalid."); primaryType = primary.toLowerCase(Locale.ENGLISH); }
/** * Constructor that builds a MimeType with the given primary and sub type * but has an empty parameter list. * * @param primary the primary MIME type * @param sub the MIME sub-type * @exception MimeTypeParseException if the primary type or subtype * is not a valid token */ public MimeType(String primary, String sub) throws MimeTypeParseException { // check to see if primary is valid if (isValidToken(primary)) { primaryType = primary.toLowerCase(Locale.ENGLISH); } else { throw new MimeTypeParseException("Primary type is invalid."); } // check to see if sub is valid if (isValidToken(sub)) { subType = sub.toLowerCase(Locale.ENGLISH); } else { throw new MimeTypeParseException("Sub type is invalid."); } parameters = new MimeTypeParameterList(); }
if (!isValidToken(primaryType)) throw new MimeTypeParseException("Primary type is invalid."); if (!isValidToken(subType)) throw new MimeTypeParseException("Sub type is invalid.");
/** * Set the subtype for this object to the given String. * * @param sub the MIME subtype * @exception MimeTypeParseException if the subtype * is not a valid token */ public void setSubType(String sub) throws MimeTypeParseException { // check to see if sub is valid if (!isValidToken(subType)) throw new MimeTypeParseException("Sub type is invalid."); subType = sub.toLowerCase(); }
/** * Set the primary type for this object to the given String. * * @param primary the primary MIME type * @exception MimeTypeParseException if the primary type * is not a valid token */ public void setPrimaryType(String primary) throws MimeTypeParseException { // check to see if primary is valid if (!isValidToken(primaryType)) throw new MimeTypeParseException("Primary type is invalid."); primaryType = primary.toLowerCase(); }
/** * Constructor that builds a MimeType with the given primary and sub type * but has an empty parameter list. * * @param primary the primary MIME type * @param sub the MIME sub-type * @exception MimeTypeParseException if the primary type or subtype * is not a valid token */ public MimeType(String primary, String sub) throws MimeTypeParseException { // check to see if primary is valid if (isValidToken(primary)) { primaryType = primary.toLowerCase(); } else { throw new MimeTypeParseException("Primary type is invalid."); } // check to see if sub is valid if (isValidToken(sub)) { subType = sub.toLowerCase(); } else { throw new MimeTypeParseException("Sub type is invalid."); } parameters = new MimeTypeParameterList(); }
if (!isValidToken(primaryType)) throw new MimeTypeParseException("Primary type is invalid."); if (!isValidToken(subType)) throw new MimeTypeParseException("Sub type is invalid.");
/** * Set the subtype for this object to the given String. * * @param sub the MIME subtype * @exception MimeTypeParseException if the subtype * is not a valid token */ public void setSubType(String sub) throws MimeTypeParseException { // check to see if sub is valid if (!isValidToken(subType)) throw new MimeTypeParseException("Sub type is invalid."); subType = sub.toLowerCase(Locale.ENGLISH); }
/** * Set the primary type for this object to the given String. * * @param primary the primary MIME type * @exception MimeTypeParseException if the primary type * is not a valid token */ public void setPrimaryType(String primary) throws MimeTypeParseException { // check to see if primary is valid if (!isValidToken(primaryType)) throw new MimeTypeParseException("Primary type is invalid."); primaryType = primary.toLowerCase(Locale.ENGLISH); }
/** * Set the subtype for this object to the given String. * * @param sub the MIME subtype * @exception MimeTypeParseException if the subtype * is not a valid token */ public void setSubType(String sub) throws MimeTypeParseException { // check to see if sub is valid if (!isValidToken(subType)) throw new MimeTypeParseException("Sub type is invalid."); subType = sub.toLowerCase(Locale.ENGLISH); }
/** * Set the primary type for this object to the given String. * * @param primary the primary MIME type * @exception MimeTypeParseException if the primary type * is not a valid token */ public void setPrimaryType(String primary) throws MimeTypeParseException { // check to see if primary is valid if (!isValidToken(primaryType)) throw new MimeTypeParseException("Primary type is invalid."); primaryType = primary.toLowerCase(Locale.ENGLISH); }
/** * Set the primary type for this object to the given String. * * @param primary the primary MIME type * @exception MimeTypeParseException if the primary type * is not a valid token */ public void setPrimaryType(String primary) throws MimeTypeParseException { // check to see if primary is valid if (!isValidToken(primaryType)) throw new MimeTypeParseException("Primary type is invalid."); primaryType = primary.toLowerCase(Locale.ENGLISH); }
/** * Set the subtype for this object to the given String. * * @param sub the MIME subtype * @exception MimeTypeParseException if the subtype * is not a valid token */ public void setSubType(String sub) throws MimeTypeParseException { // check to see if sub is valid if (!isValidToken(subType)) throw new MimeTypeParseException("Sub type is invalid."); subType = sub.toLowerCase(Locale.ENGLISH); }
/** * Set the primary type for this object to the given String. * * @param primary the primary MIME type * @exception MimeTypeParseException if the primary type * is not a valid token */ public void setPrimaryType(String primary) throws MimeTypeParseException { // check to see if primary is valid if (!isValidToken(primaryType)) throw new MimeTypeParseException("Primary type is invalid."); primaryType = primary.toLowerCase(Locale.ENGLISH); }
/** * Set the primary type for this object to the given String. * * @param primary the primary MIME type * @exception MimeTypeParseException if the primary type * is not a valid token */ public void setPrimaryType(String primary) throws MimeTypeParseException { // check to see if primary is valid if (!isValidToken(primaryType)) throw new MimeTypeParseException("Primary type is invalid."); primaryType = primary.toLowerCase(Locale.ENGLISH); }
/** * Set the subtype for this object to the given String. * * @param sub the MIME subtype * @exception MimeTypeParseException if the subtype * is not a valid token */ public void setSubType(String sub) throws MimeTypeParseException { // check to see if sub is valid if (!isValidToken(subType)) throw new MimeTypeParseException("Sub type is invalid."); subType = sub.toLowerCase(Locale.ENGLISH); }
/** * Set the subtype for this object to the given String. * * @param sub the MIME subtype * @exception MimeTypeParseException if the subtype * is not a valid token */ public void setSubType(String sub) throws MimeTypeParseException { // check to see if sub is valid if (!isValidToken(subType)) throw new MimeTypeParseException("Sub type is invalid."); subType = sub.toLowerCase(Locale.ENGLISH); }
/** * Set the primary type for this object to the given String. * * @param primary the primary MIME type * @exception MimeTypeParseException if the primary type * is not a valid token */ public void setPrimaryType(String primary) throws MimeTypeParseException { // check to see if primary is valid if (!isValidToken(primaryType)) throw new MimeTypeParseException("Primary type is invalid."); primaryType = primary.toLowerCase(Locale.ENGLISH); }
/** * Set the subtype for this object to the given String. * * @param sub the MIME subtype * @exception MimeTypeParseException if the subtype * is not a valid token */ public void setSubType(String sub) throws MimeTypeParseException { // check to see if sub is valid if (!isValidToken(subType)) throw new MimeTypeParseException("Sub type is invalid."); subType = sub.toLowerCase(Locale.ENGLISH); }