public abstract class AbstractMinimizer extends Object implements ResourceMinimizer
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
protected OperationTracker |
tracker |
| Constructor and Description |
|---|
AbstractMinimizer(org.slf4j.Logger logger,
OperationTracker tracker,
AssetChecksumGenerator checksumGenerator,
String resourceType) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract InputStream |
doMinimize(StreamableResource resource)
Implemented in subclasses to do the actual work.
|
protected boolean |
isEnabled(StreamableResource resource)
Determines if the resource can be minimized.
|
StreamableResource |
minimize(StreamableResource input)
Checks the content type of the resource and applies an
appropriate minimization to it if possible.
|
protected final org.slf4j.Logger logger
protected final OperationTracker tracker
public AbstractMinimizer(org.slf4j.Logger logger, OperationTracker tracker, AssetChecksumGenerator checksumGenerator, String resourceType)
public StreamableResource minimize(StreamableResource input) throws IOException
ResourceMinimizerminimize in interface ResourceMinimizerinput - to minimizeIOExceptionprotected abstract InputStream doMinimize(StreamableResource resource) throws IOException
resource - content to minimizeIOExceptionprotected boolean isEnabled(StreamableResource resource)
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.