public class ImageResourceHandler extends AbstractResourceHandler implements Component
Modifier and Type | Field and Description |
---|---|
private static Collection<String> |
__ALLOWED_FORMATS |
private static Pattern |
_SIZE_PATTERN |
_cocoonContext, _context, _resolver, _supportedSuffixes
MAX_PRIORITY, MIN_PRIORITY
Constructor and Description |
---|
ImageResourceHandler() |
Modifier and Type | Method and Description |
---|---|
void |
generateResource(Source source,
OutputStream out,
Parameters parameters)
Generate the resource configured during setup, and output it
|
Serializable |
getKey(Source source,
Parameters parameters)
Get the unique key for this resource, for cache purpose.
|
Source |
setup(String location,
Parameters par)
Initialize the resource handler with a resource.
|
configure, contextualize, getLastModified, getMimeType, getPriority, getSize, getValidity, isSupported, service
getLogger, setLogger
private static final Pattern _SIZE_PATTERN
private static final Collection<String> __ALLOWED_FORMATS
public ImageResourceHandler()
public Source setup(String location, Parameters par) throws ProcessingException, IOException
ResourceHandler
setup
in interface ResourceHandler
setup
in class AbstractResourceHandler
location
- The source uripar
- The parametersProcessingException
- If an error occursIOException
- If an error occurspublic void generateResource(Source source, OutputStream out, Parameters parameters) throws IOException, ProcessingException
ResourceHandler
generateResource
in interface ResourceHandler
source
- The sourceout
- The output stream to write toparameters
- The parametersIOException
- If an error occursProcessingException
- If an error occurspublic Serializable getKey(Source source, Parameters parameters)
ResourceHandler
getKey
in interface ResourceHandler
getKey
in class AbstractResourceHandler
source
- The sourceparameters
- The parameters