public interface OptimizationPolicy
DataHandlerReader.isOptimized()
or
the optimize
argument of
DataHandlerWriter.writeDataHandler(DataHandler, String, boolean)
or
DataHandlerWriter.writeDataHandler(DataHandlerProvider, String, boolean)
.Modifier and Type | Field and Description |
---|---|
static OptimizationPolicy |
ALL
Policy implementation that optimizes all binary content, regardless of whether is has been
marked as eligible for optimization.
|
static OptimizationPolicy |
DEFAULT
Policy implementation that optimizes all binary content marked as eligible for optimization.
|
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. |
static final OptimizationPolicy DEFAULT
static final OptimizationPolicy ALL
boolean isOptimized(javax.activation.DataHandler dataHandler, boolean optimize) throws IOException
DataHandler
should be
optimized.dataHandler
- 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:IncludeIOException
- if an error occurs while reading the data handlerboolean isOptimized(DataHandlerProvider dataHandlerProvider, boolean optimize) throws IOException
DataHandlerProvider
should
be optimized.dataHandlerProvider
- 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:IncludeIOException
- if an error occurs while reading the data handlerCopyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.