public class EngineRequestTransformer extends Pipe.DefaultTransformer<ConvertibleNut>
This Pipe.Transformer
handles ConvertibleNut
transformation and perform it
by delegating the job to a EngineRequestTransformer.RequireEngineRequestTransformer
. The delegated transform method will expect the
usual parameters with an additional EngineRequest
, which is wrapped by this class.
Modifier and Type | Class and Description |
---|---|
static interface |
EngineRequestTransformer.RequireEngineRequestTransformer
This interface is implemented by
Pipe.Transformer which needs a EngineRequest
to perform transformation. |
Constructor and Description |
---|
EngineRequestTransformer(EngineRequest request,
EngineRequestTransformer.RequireEngineRequestTransformer transformer)
Builds a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
transform(InputStream is,
OutputStream os,
ConvertibleNut convertible)
Reads the stream and writes the transformed bytes.
|
canAggregateTransformedStream
public EngineRequestTransformer(EngineRequest request, EngineRequestTransformer.RequireEngineRequestTransformer transformer)
Builds a new instance.
request
- the request to wraptransformer
- the delegated transformerpublic void transform(InputStream is, OutputStream os, ConvertibleNut convertible) throws IOException
Reads the stream and writes the transformed bytes.
transform
in interface Pipe.Transformer<ConvertibleNut>
transform
in class Pipe.DefaultTransformer<ConvertibleNut>
is
- the inputos
- the outputconvertible
- the object that provides the original input streamIOException
- if an I/O error occursCopyright © 2012-2015. All Rights Reserved.