|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmagoffin.matt.ma2.support.AbstractMediaHandler
magoffin.matt.ma2.image.BaseImageMediaHandler
magoffin.matt.ma2.image.awt.BaseAwtImageMediaHandler
magoffin.matt.ma2.image.iio.BaseImageIOMediaHandler
magoffin.matt.ma2.image.iio.JpegMediaHandler
public class JpegMediaHandler
JPEG media handler using ImageIO.
| Field Summary | |
|---|---|
static java.lang.String |
FORMAT_NAME_IIO_JPEG_1_0
The ImageIO JPEG format name constant. |
| Fields inherited from class magoffin.matt.ma2.image.BaseImageMediaHandler |
|---|
DEFAULT_ORIENTATION_180_VALUE, DEFAULT_ORIENTATION_90_CLOCKWISE_VALUE, DEFAULT_ORIENTATION_90_COUNTER_CLOCKWISE_VALUE, DEFAULT_ORIENTATION_METADATA_KEY, ROTATE_180, ROTATE_90_CCW, ROTATE_90_CW |
| Fields inherited from class magoffin.matt.ma2.support.AbstractMediaHandler |
|---|
log, METADATA_PARAMETER_KEY |
| Constructor Summary | |
|---|---|
|
JpegMediaHandler()
Default constructor. |
protected |
JpegMediaHandler(java.lang.String mimeType)
Construct with a different MIME type. |
| Method Summary | |
|---|---|
MediaItem |
createNewMediaItem(java.io.File inputFile)
Create a new instance of MediaItem from a File. |
java.lang.String |
getDelegateFileExtension(org.springframework.core.io.Resource mediaResource,
java.lang.String mimeType,
MediaItem item,
MediaRequest request)
Get the preferred file extension for this handler. |
void |
handleDelegateMediaRequest(org.springframework.core.io.Resource mediaResource,
java.lang.String mimeType,
MediaItem item,
MediaRequest request,
MediaResponse response)
Handle a delegate media request. |
void |
handleMediaRequest(MediaItem item,
MediaRequest request,
MediaResponse response)
Handle a media request by processing the specified media item and writing the result to MediaResponse.getOutputStream(). |
| Methods inherited from class magoffin.matt.ma2.image.iio.BaseImageIOMediaHandler |
|---|
defaultHandleDelegateRequest, defaultHandleRequest, getBufferedImage, getImageMediaHelper, setImageMediaHelper, setupBaseItemProperties |
| Methods inherited from class magoffin.matt.ma2.image.awt.BaseAwtImageMediaHandler |
|---|
getAwtMediaEffectMap, getEffect, setAwtMediaEffectMap |
| Methods inherited from class magoffin.matt.ma2.image.BaseImageMediaHandler |
|---|
getOrientation180Value, getOrientation90ClockwiseValue, getOrientation90CounterClockwiseValue, getOrientationMetadataKey, handleMetadata, needToRotate, setOrientation180Value, setOrientation90ClockwiseValue, setOrientation90CounterClockwiseValue, setOrientationMetadataKey |
| Methods inherited from class magoffin.matt.ma2.support.AbstractMediaHandler |
|---|
applyEffects, createMetadataList, defaultHandleRequestOriginal, getDomainObjectFactory, getFileExtension, getMediaBiz, getMediaMetadataInstance, getMime, getNoWatermarkSizes, getPreferredFileExtension, getRequestEffects, getSmetaPropertyMap, getUserBiz, needToAlter, setDomainObjectFactory, setMediaBiz, setMime, setNoWatermarkSizes, setPreferredFileExtension, setSmetaPropertyMap, setUserBiz |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FORMAT_NAME_IIO_JPEG_1_0
| Constructor Detail |
|---|
public JpegMediaHandler()
protected JpegMediaHandler(java.lang.String mimeType)
mimeType - the MIME type| Method Detail |
|---|
public MediaItem createNewMediaItem(java.io.File inputFile)
MediaHandlerThis method will be called when a new media item is to be
added into Matte. This method should populate as much information
as it can extract from the file into a MediaItem instance,
including populating any Metadata
it can extract from the file.
This method does not need to persist the MediaItem instance,
just populate it and return it.
createNewMediaItem in interface MediaHandlerinputFile - the file to create the media item from
public void handleDelegateMediaRequest(org.springframework.core.io.Resource mediaResource,
java.lang.String mimeType,
MediaItem item,
MediaRequest request,
MediaResponse response)
MediaHandlerDelegateThe mediaResource is not the original MediaItem
resource, rather it is the media resource extracted from
the MediaItem, e.g. the metadata resource.
handleDelegateMediaRequest in interface MediaHandlerDelegatemediaResource - the media data to processmimeType - the MIME type of the media data in mediaResourceitem - the MediaItem being processedrequest - the requestresponse - the response
public java.lang.String getDelegateFileExtension(org.springframework.core.io.Resource mediaResource,
java.lang.String mimeType,
MediaItem item,
MediaRequest request)
MediaHandlerDelegateThe mediaResource is not the original MediaItem
resource, rather it is the media resource extracted from
the MediaItem, e.g. the metadata resource.
Some handlers might return a different file extension for a given request then the default file extension for their type (for example a PNG image handler that returns JPEG images when resizing the images.
getDelegateFileExtension in interface MediaHandlerDelegatemediaResource - the media data to processmimeType - the MIME type of the media data in mediaResourceitem - the MediaItem being processedrequest - the request
public void handleMediaRequest(MediaItem item,
MediaRequest request,
MediaResponse response)
MediaHandlerMediaResponse.getOutputStream().
handleMediaRequest in interface MediaHandleritem - the media item to processrequest - the requestresponse - the response
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||