src/share/classes/javax/print/DocFlavor.java

Print this page




 528     public String getMediaSubtype() {
 529         return myMimeType.getMediaSubtype();
 530     }
 531 
 532     /**
 533      * Returns a <code>String</code> representing a MIME
 534      * parameter.
 535      * Mime types may include parameters which are usually optional.
 536      * The charset for text types is a commonly useful example.
 537      * This convenience method will return the value of the specified
 538      * parameter if one was specified in the mime type for this flavor.
 539      * <p>
 540      * @param paramName the name of the paramater. This name is internally
 541      * converted to the canonical lower case format before performing
 542      * the match.
 543      * @return String representing a mime parameter, or
 544      * null if that parameter is not in the mime type string.
 545      * @exception NullPointerException if paramName is null.
 546      */
 547     public String getParameter(String paramName) {
 548         return
 549             (String)myMimeType.getParameterMap().get(paramName.toLowerCase());
 550     }
 551 
 552     /**
 553      * Returns the name of this doc flavor object's representation class.
 554      * @return the name of the representation class.
 555      */
 556     public String getRepresentationClassName() {
 557         return myClassName;
 558     }
 559 
 560     /**
 561      * Converts this <code>DocFlavor</code> to a string.
 562      *
 563      * @return  MIME type string based on the canonical form. Each parameter
 564      *          value is enclosed in quotes.
 565      *          A "class=" parameter is appended to the
 566      *          MIME type string to indicate the representation class name.
 567      */
 568     public String toString() {
 569         return getStringValue();




 528     public String getMediaSubtype() {
 529         return myMimeType.getMediaSubtype();
 530     }
 531 
 532     /**
 533      * Returns a <code>String</code> representing a MIME
 534      * parameter.
 535      * Mime types may include parameters which are usually optional.
 536      * The charset for text types is a commonly useful example.
 537      * This convenience method will return the value of the specified
 538      * parameter if one was specified in the mime type for this flavor.
 539      * <p>
 540      * @param paramName the name of the paramater. This name is internally
 541      * converted to the canonical lower case format before performing
 542      * the match.
 543      * @return String representing a mime parameter, or
 544      * null if that parameter is not in the mime type string.
 545      * @exception NullPointerException if paramName is null.
 546      */
 547     public String getParameter(String paramName) {
 548         return myMimeType.getParameterMap().get(paramName.toLowerCase());

 549     }
 550 
 551     /**
 552      * Returns the name of this doc flavor object's representation class.
 553      * @return the name of the representation class.
 554      */
 555     public String getRepresentationClassName() {
 556         return myClassName;
 557     }
 558 
 559     /**
 560      * Converts this <code>DocFlavor</code> to a string.
 561      *
 562      * @return  MIME type string based on the canonical form. Each parameter
 563      *          value is enclosed in quotes.
 564      *          A "class=" parameter is appended to the
 565      *          MIME type string to indicate the representation class name.
 566      */
 567     public String toString() {
 568         return getStringValue();