public abstract class BlobImageResource 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 |
---|
BlobImageResource()
Construct.
|
BlobImageResource(String format)
Construct.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Blob |
getBlob(IResource.Attributes attributes)
Gets the BLOB (Binary Large OBject) that holds the raw image data.
|
protected byte[] |
getImageData(IResource.Attributes attributes)
Get image data for our dynamic image resource.
|
configureResponse, getFormat, newResourceResponse, setFormat, setLastModifiedTime, toImageData
configureCache, getCachingStrategy, respond, setRequestMetaData, setRequestRangeMetaData, setResponseContentRangeHeaderFields, setResponseHeaders
public BlobImageResource(String format)
format
- public BlobImageResource()
protected 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 parametersnull
means there is no image and 404
(Not found) response will be return.protected abstract Blob getBlob(IResource.Attributes attributes)
attributes
- the current web attributes (request, response, parameters)Copyright © 2006–2019 Apache Software Foundation. All rights reserved.