Enum Class Formats

java.lang.Object
java.lang.Enum<Formats>
org.openpreservation.odf.fmt.Formats
All Implemented Interfaces:
Serializable, Comparable<Formats>, java.lang.constant.Constable

public enum Formats extends Enum<Formats>
  • Enum Constant Details

    • ZIP

      public static final Formats ZIP
    • XML

      public static final Formats XML
    • ODB

      public static final Formats ODB
    • ODC

      public static final Formats ODC
    • ODF

      public static final Formats ODF
    • ODG

      public static final Formats ODG
    • ODI

      public static final Formats ODI
    • ODM

      public static final Formats ODM
    • ODP

      public static final Formats ODP
    • ODS

      public static final Formats ODS
    • ODT

      public static final Formats ODT
    • OTC

      public static final Formats OTC
    • OTF

      public static final Formats OTF
    • OTG

      public static final Formats OTG
    • OTH

      public static final Formats OTH
    • OTI

      public static final Formats OTI
    • OTM

      public static final Formats OTM
    • OTP

      public static final Formats OTP
    • OTS

      public static final Formats OTS
    • OTT

      public static final Formats OTT
    • UNKNOWN

      public static final Formats UNKNOWN
  • Field Details

    • mime

      public final String mime
      The String MIME type identifier
    • extension

      public final String extension
      The String extension associated with the MIME type
  • Method Details

    • values

      public static Formats[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Formats valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • identify

      public static Formats identify(byte[] bytes)
    • fromMime

      public static Formats fromMime(String mime)
    • fromExtension

      public static Formats fromExtension(String ext)
    • isText

      public boolean isText()
    • isPackage

      public boolean isPackage()
    • isOdf

      public boolean isOdf()
    • getSignatureCount

      public int getSignatureCount()
    • getMaxSignatureLength

      public int getMaxSignatureLength()
    • getBytes

      public byte[] getBytes()
      Get the MIME type as an ASCII encoded byte array.
      Returns:
      the ASCII encoded MIME type id as a byte array