Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 java.lang.Object
implements ResourceMinimizer

Base class for resource minimizers.

Since:
  5.3

Field Summary
`protected org.slf4j.Logger` | `logger`
`protected OperationTracker` | `tracker`

Constructor Summary
`AbstractMinimizer(org.slf4j.Logger logger, OperationTracker tracker, java.lang.String resourceType)`

Method Summary
`protected abstract void` | `doMinimize(StreamableResource resource, java.io.Writer output)` Implemented in subclasses to do the actual work.
`StreamableResource` | `minimize(StreamableResource input)` Checks the content type of the resource and applies an appropriate minimization to it if possible.
`protected java.io.Reader` | `toReader(StreamableResource input)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### logger

    protected final org.slf4j.Logger logger

### tracker

    protected final OperationTracker tracker

Constructor Detail

### AbstractMinimizer

    public AbstractMinimizer(org.slf4j.Logger logger,
                             OperationTracker tracker,
                             java.lang.String resourceType)

Method Detail

### minimize

    public StreamableResource minimize(StreamableResource input)
                                throws java.io.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:
    `java.io.IOException`

### toReader

    protected java.io.Reader toReader(StreamableResource input)
                               throws java.io.IOException

  Throws:
    `java.io.IOException`

### doMinimize

    protected abstract void doMinimize(StreamableResource resource,
                                       java.io.Writer output)
                                throws java.io.IOException

  Implemented in subclasses to do the actual work.

  Parameters:
    `resource` - content to minimize
    `output` - writer for minimized version of input
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.