de.esprit.common.type

## Enum FileExtension

- java.lang.Object
- - java.lang.Enum<FileExtension>
  - - de.esprit.common.type.FileExtension

- All Implemented Interfaces:
    Renderable, java.io.Serializable, java.lang.Comparable<FileExtension>

      public enum FileExtension
      extends java.lang.Enum<FileExtension>
      implements Renderable

  Specifies well known file extensions.
  Author:
    Rainer Buesch

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `AIFF`
    `AU`
    `AVI`
    `BAT`
    `BSH`
    `C`
    `CC`
    `CFG`
    `CLASS`
    `CRED`
    `CSH`
    `CSS`
    `DOC`
    `DTD`
    `EAR`
    `ENV`
    `EXE`
    `FOR`
    `GIF`
    `GZ`
    `GZIP`
    `HTM`
    `HTML`
    `ICO`
    `JAR`
    `JAVA`
    `JNLP`
    `JPEG`
    `JPG`
    `JS`
    `JSF`
    `JSP`
    `KSH`
    `LIC`
    `LOG`
    `MAP`
    `MPEG`
    `NDF`
    `ODG`
    `ODT`
    `PAS`
    `PDF`
    `PNG`
    `PPS`
    `PPT`
    `PREFS`
    `PROPERTIES`
    `SH`
    `SQL`
    `TAR`
    `TAR_GZ`
    `TGZ`
    `TIF`
    `TIFF`
    `TLD`
    `TXT`
    `UNKNOWN`
    `UNL`
    `UNTYPED`
    `VIO`
    `VSD`
    `WAR`
    `WAV`
    `XLS`
    `XML`
    `ZIP`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static FileDataType` | `determineFileDataTypeOf(java.io.File file, FileDataType defaultType)` Tries to figure out the `FileDataType` of the given file.
    `static FileDataType` | `determineFileDataTypeOf(java.nio.file.Path path, FileDataType defaultType)` Tries to figure out the `FileDataType` of the given file.
    `static FileDataType` | `determineFileDataTypeOf(java.lang.String fileName, FileDataType defaultType)` Tries to figure out the `FileDataType` of the given fileName.
    `static FileExtension` | `fromFile(java.io.File file)`
    `static FileExtension` | `fromFileName(java.lang.String fileName)`
    `static FileExtension` | `fromPath(java.nio.file.Path path)`
    `static FileExtension` | `fromString(java.lang.String extension)`
    `NlsKey` | `getDescriptionKey()`
    `static java.lang.String` | `getExtensionOf(java.io.File file)` Returns the file extension of the given file
    `static java.lang.String` | `getExtensionOf(java.nio.file.Path path)` Returns the file extension of the given file
    `static java.lang.String` | `getExtensionOf(java.lang.String fileName)` Returns the file extension of the given filename
    `FileDataType` | `getFileDataType()`
    `IconKey` | `getIconKey()`
    `java.awt.Color` | `getRenderColor()`
    `javax.swing.Icon` | `getRenderIcon()`
    `java.lang.String` | `getRenderText()`
    `static boolean` | `hasExtension(java.io.File file)` Tells whether the given file has an extension at all
    `static boolean` | `hasExtension(java.lang.String fileName)` Tells whether the given fileName has an extension at all
    `boolean` | `isArchive()`
    `boolean` | `isAscii()`
    `boolean` | `isAudioType()`
    `boolean` | `isBinary()`
    `boolean` | `isExecutable()`
    `boolean` | `isGZippedTarArchive()`
    `boolean` | `isImageType()`
    `boolean` | `isTarArchive()`
    `boolean` | `isUncompressableType()` Tells whether this data is basically compressed already so that it would not make sense to compress further (i.e. jpeg, zip, etc...)
    `boolean` | `isUnknown()`
    `boolean` | `isUntyped()`
    `boolean` | `isVideoType()`
    `boolean` | `isZipArchive()`
    `boolean` | `isZippedType()`
    `static FileExtension` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static FileExtension[]` | `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

    - #### UNTYPED

          public static final FileExtension UNTYPED

    - #### UNKNOWN

          public static final FileExtension UNKNOWN

    - #### BAT

          public static final FileExtension BAT

    - #### TXT

          public static final FileExtension TXT

    - #### LOG

          public static final FileExtension LOG

    - #### PDF

          public static final FileExtension PDF

    - #### ZIP

          public static final FileExtension ZIP

    - #### GZ

          public static final FileExtension GZ

    - #### GZIP

          public static final FileExtension GZIP

    - #### TGZ

          public static final FileExtension TGZ

    - #### TAR_GZ

          public static final FileExtension TAR_GZ

    - #### TAR

          public static final FileExtension TAR

    - #### EXE

          public static final FileExtension EXE

    - #### SH

          public static final FileExtension SH

    - #### KSH

          public static final FileExtension KSH

    - #### CSH

          public static final FileExtension CSH

    - #### BSH

          public static final FileExtension BSH

    - #### HTM

          public static final FileExtension HTM

    - #### HTML

          public static final FileExtension HTML

    - #### CSS

          public static final FileExtension CSS

    - #### CLASS

          public static final FileExtension CLASS

    - #### JAVA

          public static final FileExtension JAVA

    - #### JS

          public static final FileExtension JS

    - #### JSP

          public static final FileExtension JSP

    - #### JSF

          public static final FileExtension JSF

    - #### JNLP

          public static final FileExtension JNLP

    - #### JAR

          public static final FileExtension JAR

    - #### WAR

          public static final FileExtension WAR

    - #### EAR

          public static final FileExtension EAR

    - #### PROPERTIES

          public static final FileExtension PROPERTIES

    - #### PREFS

          public static final FileExtension PREFS

    - #### FOR

          public static final FileExtension FOR

    - #### PAS

          public static final FileExtension PAS

    - #### C

          public static final FileExtension C

    - #### CC

          public static final FileExtension CC

    - #### TLD

          public static final FileExtension TLD

    - #### DTD

          public static final FileExtension DTD

    - #### XML

          public static final FileExtension XML

    - #### CRED

          public static final FileExtension CRED

    - #### MAP

          public static final FileExtension MAP

    - #### SQL

          public static final FileExtension SQL

    - #### UNL

          public static final FileExtension UNL

    - #### VIO

          public static final FileExtension VIO

    - #### GIF

          public static final FileExtension GIF

    - #### TIFF

          public static final FileExtension TIFF

    - #### TIF

          public static final FileExtension TIF

    - #### PNG

          public static final FileExtension PNG

    - #### JPG

          public static final FileExtension JPG

    - #### JPEG

          public static final FileExtension JPEG

    - #### ICO

          public static final FileExtension ICO

    - #### AVI

          public static final FileExtension AVI

    - #### MPEG

          public static final FileExtension MPEG

    - #### AIFF

          public static final FileExtension AIFF

    - #### AU

          public static final FileExtension AU

    - #### WAV

          public static final FileExtension WAV

    - #### DOC

          public static final FileExtension DOC

    - #### XLS

          public static final FileExtension XLS

    - #### VSD

          public static final FileExtension VSD

    - #### PPS

          public static final FileExtension PPS

    - #### PPT

          public static final FileExtension PPT

    - #### ODT

          public static final FileExtension ODT

    - #### ODG

          public static final FileExtension ODG

    - #### LIC

          public static final FileExtension LIC

    - #### ENV

          public static final FileExtension ENV

    - #### NDF

          public static final FileExtension NDF

    - #### CFG

          public static final FileExtension CFG

  - ### Method Detail

    - #### values

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

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

    - #### valueOf

          public static FileExtension valueOf(java.lang.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:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### getIconKey

          public IconKey getIconKey()

    - #### getDescriptionKey

          public NlsKey getDescriptionKey()

    - #### isUnknown

          public boolean isUnknown()

    - #### isUntyped

          public boolean isUntyped()

    - #### isAscii

          public boolean isAscii()

    - #### isBinary

          public boolean isBinary()

    - #### isUncompressableType

          public boolean isUncompressableType()

      Tells whether this data is basically compressed already so that it would not make sense to compress further (i.e. jpeg, zip, etc...)

    - #### isArchive

          public boolean isArchive()

    - #### isZippedType

          public boolean isZippedType()

    - #### isZipArchive

          public boolean isZipArchive()

    - #### isTarArchive

          public boolean isTarArchive()

    - #### isGZippedTarArchive

          public boolean isGZippedTarArchive()

    - #### isImageType

          public boolean isImageType()

    - #### isAudioType

          public boolean isAudioType()

    - #### isVideoType

          public boolean isVideoType()

    - #### isExecutable

          public boolean isExecutable()

    - #### fromPath

          public static FileExtension fromPath(java.nio.file.Path path)

    - #### fromFile

          public static FileExtension fromFile(java.io.File file)

    - #### fromFileName

          public static FileExtension fromFileName(java.lang.String fileName)

    - #### fromString

          public static FileExtension fromString(java.lang.String extension)

    - #### getFileDataType

          public FileDataType getFileDataType()

    - #### getRenderColor

          public java.awt.Color getRenderColor()

      Specified by:
        `getRenderColor` in interface `Renderable`

    - #### getRenderIcon

          public javax.swing.Icon getRenderIcon()

      Specified by:
        `getRenderIcon` in interface `Renderable`

    - #### getRenderText

          public java.lang.String getRenderText()

      Specified by:
        `getRenderText` in interface `Renderable`

    - #### getExtensionOf

          public static java.lang.String getExtensionOf(java.lang.String fileName)

      Returns the file extension of the given filename

    - #### getExtensionOf

          public static java.lang.String getExtensionOf(java.io.File file)

      Returns the file extension of the given file

    - #### getExtensionOf

          public static java.lang.String getExtensionOf(java.nio.file.Path path)

      Returns the file extension of the given file

    - #### hasExtension

          public static boolean hasExtension(java.lang.String fileName)

      Tells whether the given fileName has an extension at all

    - #### hasExtension

          public static boolean hasExtension(java.io.File file)

      Tells whether the given file has an extension at all

    - #### determineFileDataTypeOf

          public static FileDataType determineFileDataTypeOf(java.io.File file,
                                             FileDataType defaultType)

      Tries to figure out the `FileDataType` of the given file. If the File is a directory, the type is always DIRECTORY.
      Returns:
        either ASCII or BINARY or defaultType if the file extension is unknown.

    - #### determineFileDataTypeOf

          public static FileDataType determineFileDataTypeOf(java.nio.file.Path path,
                                             FileDataType defaultType)

      Tries to figure out the `FileDataType` of the given file. If the File is a directory, the type is always BINARY.
      Returns:
        either ASCII or BINARY or defaultType if the file extension is unknown.

    - #### determineFileDataTypeOf

          public static FileDataType determineFileDataTypeOf(java.lang.String fileName,
                                             FileDataType defaultType)

      Tries to figure out the `FileDataType` of the given fileName.
      Returns:
        either ASCII or BINARY or defaultType if the file extension is unknown.

Copyright © 2014 EsprIT-Systems. All Rights Reserved.