public class ThumbnailImageResource extends DynamicImageResource
AbstractResource.ContentRangeType, AbstractResource.ResourceResponse, AbstractResource.WriteCallback
IResource.Attributes
CONTENT_DISPOSITION_HEADER_NAME, CONTENT_RANGE_ENDBYTE, CONTENT_RANGE_STARTBYTE, INTERNAL_HEADERS
Constructor and Description |
---|
ThumbnailImageResource(IResource unscaledImageResource,
int maxSize)
Construct.
|
Modifier and Type | Method and Description |
---|---|
protected byte[] |
getImageData(IResource.Attributes attributes)
Get image data for our dynamic image resource.
|
protected BufferedImage |
getScaledImageInstance(IResource.Attributes attributes)
get resized image instance.
|
configureResponse, getFormat, newResourceResponse, setFormat, setLastModifiedTime, toImageData
configureCache, getCachingStrategy, respond, setRequestMetaData, setRequestRangeMetaData, setResponseContentRangeHeaderFields, setResponseHeaders
public ThumbnailImageResource(IResource unscaledImageResource, int maxSize)
unscaledImageResource
- the unscaled, original image resource. Must be not nullmaxSize
- maximum size (width or height) for resize operationprotected byte[] getImageData(IResource.Attributes attributes)
DynamicImageResource
DynamicImageResource.setLastModifiedTime(Time)
when it does so. This
ensures that image caching works correctly.getImageData
in class DynamicImageResource
attributes
- the context bringing the request, response and the parametersprotected BufferedImage getScaledImageInstance(IResource.Attributes attributes)
attributes
- Copyright © 2006–2021 Apache Software Foundation. All rights reserved.