public abstract class AbstractMinimizer extends java.lang.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,
java.lang.String resourceType) |
Modifier and Type | Method and Description |
---|---|
protected abstract java.io.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, java.lang.String resourceType)
public StreamableResource minimize(StreamableResource input) throws java.io.IOException
ResourceMinimizer
minimize
in interface ResourceMinimizer
input
- to minimizejava.io.IOException
protected abstract java.io.InputStream doMinimize(StreamableResource resource) throws java.io.IOException
resource
- content to minimizejava.io.IOException
protected boolean isEnabled(StreamableResource resource)
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.