コード例 #1
0
 /**
  * This will set the <code>charset</code> to whatever value the string contains. If the string is
  * null then this will not set the parameter to any value and the <code>toString</code> method
  * will not contain any details of the parameter.
  *
  * @param enc parameter value to add to the MIME type
  */
 public void setCharset(String enc) {
   charset.reset(enc);
 }
コード例 #2
0
 /**
  * This sets the secondary type to whatever value is in the string provided is. If the string is
  * null then this will contain a null string for the secondary type of the parameter, which is
  * likely invalid in most cases.
  *
  * @param value the type to set for the primary type of this
  */
 public void setSecondary(String value) {
   type.reset(primary);
   type.append('/');
   type.append(value);
   secondary.reset(value);
 }