Package org.apache.sling.thumbnails

## Enum OutputFileFormat

- java.lang.Object
- - java.lang.Enum<OutputFileFormat>
  - - org.apache.sling.thumbnails.OutputFileFormat

All Implemented Interfaces:
  `Serializable`, `Comparable<OutputFileFormat>`

    @ProviderType
    public enum OutputFileFormat
    extends Enum<OutputFileFormat>

Enumeration of the valid output formats for the thumbnail generator.

### Enum Constant Summary

Enum Constants
`GIF`
`JPEG`
`PNG`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static OutputFileFormat` `forRequest​(org.apache.sling.api.SlingHttpServletRequest request)` Loads the output format requested in the specified request suffix.
`static OutputFileFormat` `forValue​(@NotNull String format)` Loads the output format
`String` `getMimeType()`
`static OutputFileFormat` `valueOf​(String name)` Returns the enum constant of this type with the specified name.
`static OutputFileFormat[]` `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

#### GIF

    public static final OutputFileFormat GIF

#### JPEG

    public static final OutputFileFormat JPEG

#### PNG

    public static final OutputFileFormat PNG

### Method Detail

#### values

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

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

#### valueOf

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

#### forRequest

    public static OutputFileFormat forRequest​(org.apache.sling.api.SlingHttpServletRequest request)

Loads the output format requested in the specified request suffix.

Parameters:
  `request` - the current request from which to get the suffix
Returns:
  the format for the suffix

#### forValue

    public static OutputFileFormat forValue​(@NotNull
                                            @NotNull String format)

Loads the output format

Parameters:
  `format` - the requested format
Returns:
  the format requested

#### getMimeType

    public String getMimeType()