Class CropHandler
- java.lang.Object
-
- org.apache.sling.thumbnails.internal.transformers.CropHandler
-
- All Implemented Interfaces:
TransformationHandler
public class CropHandler extends Object implements TransformationHandler
A transformation handler to crop images
-
-
Field Summary
Fields Modifier and Type Field Description static StringPN_POSITIONstatic StringRESOURCE_TYPE
-
Constructor Summary
Constructors Constructor Description CropHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetResourceType()Get the resource type associated with this handlervoidhandle(InputStream inputStream, OutputStream outputStream, TransformationHandlerConfig config)Handles the transformation of the file using the command values from the suffix segment.
-
-
-
Field Detail
-
PN_POSITION
public static final String PN_POSITION
- See Also:
- Constant Field Values
-
RESOURCE_TYPE
public static final String RESOURCE_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getResourceType
public String getResourceType()
Description copied from interface:TransformationHandlerGet the resource type associated with this handler- Specified by:
getResourceTypein interfaceTransformationHandler- Returns:
- the handler resource type
-
handle
public void handle(InputStream inputStream, OutputStream outputStream, TransformationHandlerConfig config) throws IOException
Description copied from interface:TransformationHandlerHandles the transformation of the file using the command values from the suffix segment.- Specified by:
handlein interfaceTransformationHandler- Parameters:
inputStream- the inputstream from which to read the file to transform fromoutputStream- the outputstream to write the transformed file toconfig- the configuration values for the transformation- Throws:
IOException- an exception occurs transforming the file
-
-