org.foray.common
Enum Mime

java.lang.Object
  extended by java.lang.Enum<Mime>
      extended by org.foray.common.Mime
All Implemented Interfaces:
Serializable, Comparable<Mime>

public enum Mime
extends Enum<Mime>

An enumeration of some mime-types.


Enum Constant Summary
JAVA2D
          The (pseudo) MIME type for Java 2D output.
MATHML
          The (assumed) MIME type for MathML documents.
PDF
          The MIME type for PDF.
POSTSCRIPT
          The MIME type for PostScript.
SVG
          The MIME type for SVG.
 
Method Summary
 String getMimeString()
          Returns the string used to designate this mime type.
static Mime valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Mime[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PDF

public static final Mime PDF
The MIME type for PDF.


POSTSCRIPT

public static final Mime POSTSCRIPT
The MIME type for PostScript.


JAVA2D

public static final Mime JAVA2D
The (pseudo) MIME type for Java 2D output.


SVG

public static final Mime SVG
The MIME type for SVG.


MATHML

public static final Mime MATHML
The (assumed) MIME type for MathML documents.

Method Detail

values

public static Mime[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Mime c : Mime.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Mime valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getMimeString

public String getMimeString()
Returns the string used to designate this mime type.

Returns:
The string used to designate this mime type.


Copyright © 2017. All rights reserved.