com.j256.simplemagic
Enum ContentType

java.lang.Object
  extended by java.lang.Enum<ContentType>
      extended by com.j256.simplemagic.ContentType
All Implemented Interfaces:
Serializable, Comparable<ContentType>

public enum ContentType
extends Enum<ContentType>

Enumerated type of the content if it is known by SimpleMagic matched from the mime-type. This information is _not_ processed from the magic files.

Author:
graywatson

Enum Constant Summary
AIFF
          AIFF audio format
APPLE_QUICKTIME_IMAGE
          Apple Quicktime image
APPLE_QUICKTIME_MOVIE
          Apple Quicktime movie
ARC
          ARC archive data
AUDIO_MPEG
          MPEG audio file
AVI
          Microsoft AVI video file
AWK
          Unix AWK command script
BINHEX
          Macintosh BinHex file
BITTORRENT
          Bittorrent file
BMP
          Microsoft PC bitmap image
BZIP2
          Bzip2 compressed file
COMPRESS
          Unix compress file
CORE_DUMP
          Unix core dump output
COREL_DRAW
          Corel Draw image file
CPIO
          Unix CPIO archive data
DBM
          Berkeley database file
DEBIAN_PACKAGE
          Debian installation package
DIFF
          Unix diff output
DVI
          TeX DVI output file
FLASH
          Macromedia Flash data
FLASH_VIDEO
          Macromedia Flash movie file
FORTRAN
          FORTRAN program
FRAMEMAKER
          FrameMaker document
GAWK
          GNU awk script
GDBM
          GNU database file
GIF
          GIF image file
GNU_INFO
          GNU Info file
GNUMERIC
          GNU Numeric file
GNUPG_KEYRING
          GPG keyring file
GZIP
          Gzip compressed data
H264
          H264 video encoded file
HTML
          HTML document
ICO
          MS Windows icon resource
ISO_9660
          ISO 9660 CD-ROM filesystem data
JAVA_APPLET
          Java applet
JAVA_KEYSTORE
          Java keystore file
JPEG
          JPEG image
JPEG_2000
          JPEG 2000 image
LHA
          LHA archive data
LISP
          Lisp program
LOTUS_123
          Lotus 123 spreadsheet
MICROSOFT_ACCESS
          Microsoft access database
MICROSOFT_EXCEL
          Microsoft excel spreadsheet
MICROSOFT_WORD
          Microsoft word document
MIDI
          MIDI audio
MNG
          MNG video
MP4
          MP4 encoded video
MP4V
          MP4V encoded video
NAWK
          New Awk script
NEWS
          Network news message
OGG
          OGG file container
OTHER
           
PBM
          PBM image
PDF
          PDF document
PERL
          Perl script
PGM
          PGM image
PGP
          PGP encrypted message
PGP_KEYRING
          PGP keyring
PGP_SIGNATURE
          PGP signature
PHOTOSHOP
          Photoshop image
PHP
          PHP script
PNG
          PNG image
POSTSCRIPT
          Postscript file
PPM
          PPM image
RAR
          RAR archive data
REAL_AUDIO
          Real-audio file
REAL_MEDIA
          Real-media file
RFC822
          RFC822 news message
RPM
          RedHat package file
RTF
          Rich text format document
SHARED_LIBRARY
          Shared library file
SHELL_SCRIPT
          Unix shell script
STUFFIT
          Mac Stuffit archive data
SVG
          SVG image
TAR
          TAR archive data
TEX
          TeX document
TEXINFO
          TeXinfo document
TIFF
          TIFF image
TROFF
          Troff document
VCARD
          vCard visiting card
VIDEO_MPEG
          Mpeg video
VRML
          VRML modeling file
WAV
          WAV audio
X3D
          X3D modeling file
XML
          XML document
ZIP
          Zip archive data
ZOO
          Zoo archive data
 
Method Summary
static ContentType fromMimeType(String mimeType)
          Return the type associated with the mime-type string or OTHER if not found.
 String getSimpleName()
          Get simple name of the type or null if none.
static ContentType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ContentType[] 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

AIFF

public static final ContentType AIFF
AIFF audio format


APPLE_QUICKTIME_IMAGE

public static final ContentType APPLE_QUICKTIME_IMAGE
Apple Quicktime image


APPLE_QUICKTIME_MOVIE

public static final ContentType APPLE_QUICKTIME_MOVIE
Apple Quicktime movie


ARC

public static final ContentType ARC
ARC archive data


AUDIO_MPEG

public static final ContentType AUDIO_MPEG
MPEG audio file


AVI

public static final ContentType AVI
Microsoft AVI video file


AWK

public static final ContentType AWK
Unix AWK command script


BINHEX

public static final ContentType BINHEX
Macintosh BinHex file


BITTORRENT

public static final ContentType BITTORRENT
Bittorrent file


BMP

public static final ContentType BMP
Microsoft PC bitmap image


BZIP2

public static final ContentType BZIP2
Bzip2 compressed file


COMPRESS

public static final ContentType COMPRESS
Unix compress file


COREL_DRAW

public static final ContentType COREL_DRAW
Corel Draw image file


CORE_DUMP

public static final ContentType CORE_DUMP
Unix core dump output


CPIO

public static final ContentType CPIO
Unix CPIO archive data


DBM

public static final ContentType DBM
Berkeley database file


DEBIAN_PACKAGE

public static final ContentType DEBIAN_PACKAGE
Debian installation package


DIFF

public static final ContentType DIFF
Unix diff output


DVI

public static final ContentType DVI
TeX DVI output file


FLASH

public static final ContentType FLASH
Macromedia Flash data


FLASH_VIDEO

public static final ContentType FLASH_VIDEO
Macromedia Flash movie file


FORTRAN

public static final ContentType FORTRAN
FORTRAN program


FRAMEMAKER

public static final ContentType FRAMEMAKER
FrameMaker document


GAWK

public static final ContentType GAWK
GNU awk script


GDBM

public static final ContentType GDBM
GNU database file


GIF

public static final ContentType GIF
GIF image file


GNUMERIC

public static final ContentType GNUMERIC
GNU Numeric file


GNUPG_KEYRING

public static final ContentType GNUPG_KEYRING
GPG keyring file


GNU_INFO

public static final ContentType GNU_INFO
GNU Info file


GZIP

public static final ContentType GZIP
Gzip compressed data


H264

public static final ContentType H264
H264 video encoded file


HTML

public static final ContentType HTML
HTML document


ICO

public static final ContentType ICO
MS Windows icon resource


ISO_9660

public static final ContentType ISO_9660
ISO 9660 CD-ROM filesystem data


JAVA_APPLET

public static final ContentType JAVA_APPLET
Java applet


JAVA_KEYSTORE

public static final ContentType JAVA_KEYSTORE
Java keystore file


JPEG

public static final ContentType JPEG
JPEG image


JPEG_2000

public static final ContentType JPEG_2000
JPEG 2000 image


LHA

public static final ContentType LHA
LHA archive data


LISP

public static final ContentType LISP
Lisp program


LOTUS_123

public static final ContentType LOTUS_123
Lotus 123 spreadsheet


MICROSOFT_ACCESS

public static final ContentType MICROSOFT_ACCESS
Microsoft access database


MICROSOFT_EXCEL

public static final ContentType MICROSOFT_EXCEL
Microsoft excel spreadsheet


MICROSOFT_WORD

public static final ContentType MICROSOFT_WORD
Microsoft word document


MIDI

public static final ContentType MIDI
MIDI audio


MNG

public static final ContentType MNG
MNG video


MP4

public static final ContentType MP4
MP4 encoded video


MP4V

public static final ContentType MP4V
MP4V encoded video


NAWK

public static final ContentType NAWK
New Awk script


NEWS

public static final ContentType NEWS
Network news message


OGG

public static final ContentType OGG
OGG file container


PBM

public static final ContentType PBM
PBM image


PDF

public static final ContentType PDF
PDF document


PERL

public static final ContentType PERL
Perl script


PGM

public static final ContentType PGM
PGM image


PGP

public static final ContentType PGP
PGP encrypted message


PGP_KEYRING

public static final ContentType PGP_KEYRING
PGP keyring


PGP_SIGNATURE

public static final ContentType PGP_SIGNATURE
PGP signature


PHOTOSHOP

public static final ContentType PHOTOSHOP
Photoshop image


PHP

public static final ContentType PHP
PHP script


PNG

public static final ContentType PNG
PNG image


POSTSCRIPT

public static final ContentType POSTSCRIPT
Postscript file


PPM

public static final ContentType PPM
PPM image


RAR

public static final ContentType RAR
RAR archive data


REAL_AUDIO

public static final ContentType REAL_AUDIO
Real-audio file


REAL_MEDIA

public static final ContentType REAL_MEDIA
Real-media file


RFC822

public static final ContentType RFC822
RFC822 news message


RPM

public static final ContentType RPM
RedHat package file


RTF

public static final ContentType RTF
Rich text format document


SHARED_LIBRARY

public static final ContentType SHARED_LIBRARY
Shared library file


SHELL_SCRIPT

public static final ContentType SHELL_SCRIPT
Unix shell script


STUFFIT

public static final ContentType STUFFIT
Mac Stuffit archive data


SVG

public static final ContentType SVG
SVG image


TAR

public static final ContentType TAR
TAR archive data


TEX

public static final ContentType TEX
TeX document


TEXINFO

public static final ContentType TEXINFO
TeXinfo document


TIFF

public static final ContentType TIFF
TIFF image


TROFF

public static final ContentType TROFF
Troff document


VCARD

public static final ContentType VCARD
vCard visiting card


VIDEO_MPEG

public static final ContentType VIDEO_MPEG
Mpeg video


VRML

public static final ContentType VRML
VRML modeling file


WAV

public static final ContentType WAV
WAV audio


X3D

public static final ContentType X3D
X3D modeling file


XML

public static final ContentType XML
XML document


ZIP

public static final ContentType ZIP
Zip archive data


ZOO

public static final ContentType ZOO
Zoo archive data


OTHER

public static final ContentType OTHER
Method Detail

values

public static ContentType[] 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 (ContentType c : ContentType.values())
    System.out.println(c);

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

valueOf

public static ContentType 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

getSimpleName

public String getSimpleName()
Get simple name of the type or null if none.


fromMimeType

public static ContentType fromMimeType(String mimeType)
Return the type associated with the mime-type string or OTHER if not found.



This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.