class OptimizationPolicyImpl extends java.lang.Object implements OptimizationPolicy
OptimizationPolicy implementation that takes a decision based on the
settings in OMOutputFormat.
For internal use only.
| Modifier and Type | Field and Description |
|---|---|
private static int |
EXCEED_LIMIT |
private OMOutputFormat |
format |
private static org.apache.commons.logging.Log |
log |
private static int |
UNSUPPORTED |
ALL, DEFAULT| Constructor and Description |
|---|
OptimizationPolicyImpl(OMOutputFormat format) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isOptimized(javax.activation.DataHandler dataHandler,
boolean optimize)
Determine whether the binary content supplied by a given
DataHandler should be
optimized. |
boolean |
isOptimized(DataHandlerProvider dataHandlerProvider,
boolean optimize)
Determine whether the binary content supplied by a given
DataHandlerProvider should
be optimized. |
private static final org.apache.commons.logging.Log log
private final OMOutputFormat format
private static final int UNSUPPORTED
private static final int EXCEED_LIMIT
public OptimizationPolicyImpl(OMOutputFormat format)
public boolean isOptimized(javax.activation.DataHandler dataHandler,
boolean optimize)
OptimizationPolicyDataHandler should be
optimized.isOptimized in interface OptimizationPolicydataHandler - the binary contentoptimize - indicates whether the binary content was initially marked as eligible for
optimization (see above)true if the binary content should be optimized using XOP, i.e. encoded
using xop:Includepublic boolean isOptimized(DataHandlerProvider dataHandlerProvider, boolean optimize) throws java.io.IOException
OptimizationPolicyDataHandlerProvider should
be optimized.isOptimized in interface OptimizationPolicydataHandlerProvider - the binary contentoptimize - indicates whether the binary content was initially marked as eligible for
optimization (see above)true if the binary content should be optimized using XOP, i.e. encoded
using xop:Includejava.io.IOException - if an error occurs while reading the data handler