org.apache.tapestry5.internal.yuicompressor
Class AbstractMinimizer
java.lang.Object
org.apache.tapestry5.internal.yuicompressor.AbstractMinimizer
- All Implemented Interfaces:
- ResourceMinimizer
- Direct Known Subclasses:
- CSSResourceMinimizer, JavaScriptResourceMinimizer
public abstract class AbstractMinimizer
- extends Object
- implements ResourceMinimizer
Base class for resource minimizers.
- Since:
- 5.3
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.slf4j.Logger logger
tracker
protected final OperationTracker tracker
AbstractMinimizer
public AbstractMinimizer(org.slf4j.Logger logger,
OperationTracker tracker,
String resourceType)
minimize
public StreamableResource minimize(StreamableResource input)
throws IOException
- Description copied from interface:
ResourceMinimizer
- Checks the content type of the resource and applies an
appropriate minimization to it if possible.
- Specified by:
minimize
in interface ResourceMinimizer
- Parameters:
input
- to minimize
- Returns:
- the same resource, or a minimized replacement for the resource
- Throws:
IOException
toReader
protected Reader toReader(StreamableResource input)
throws IOException
- Throws:
IOException
doMinimize
protected abstract void doMinimize(StreamableResource resource,
Writer output)
throws IOException
- Implemented in subclasses to do the actual work.
- Parameters:
resource
- content to minimizeoutput
- writer for minimized version of input
- Throws:
IOException
Copyright © 2003-2012 The Apache Software Foundation.