org.apache.sling.fileoptim.internal.optimizers

## Class JpegFileOptimizer

- java.lang.Object
- - org.apache.sling.fileoptim.internal.optimizers.JpegFileOptimizer

All Implemented Interfaces:
  FileOptimizer

    public class JpegFileOptimizer
    extends Object
    implements FileOptimizer

Default optimizer which lossily compresses a JPEG image.

### Nested Class Summary

Nested Classes
`static interface` `JpegFileOptimizer.Config`

### Constructor Summary

Constructors
Constructor and Description
`JpegFileOptimizer()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `activate(JpegFileOptimizer.Config config)`
`String` `getName()` Gets the name of the optimizer
`byte[]` `optimizeFile(byte[] original, String metaType)` Optimize a single file.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### JpegFileOptimizer

    public JpegFileOptimizer()

### Method Detail

#### activate

    public void activate(JpegFileOptimizer.Config config)

#### optimizeFile

    public byte[] optimizeFile(byte[] original,
                               String metaType)

Description copied from interface: `FileOptimizer`
Optimize a single file.

Specified by:
  `optimizeFile` in interface `FileOptimizer`
Parameters:
  `original` - the original file to optimize
  `metaType` - the type of the file to optimize
Returns:
  the optimized file

#### getName

    public String getName()

Description copied from interface: `FileOptimizer`
Gets the name of the optimizer

Specified by:
  `getName` in interface `FileOptimizer`
Returns:
  the name of the optimizer