T
- the type of convertible objectpublic static class Pipe.DefaultTransformer<T> extends Object implements Pipe.Transformer<T>
The default transformer just copies the InputStream
to the OutputStream
and produces a content
which can be aggregated to an other one.
Constructor and Description |
---|
Pipe.DefaultTransformer() |
Modifier and Type | Method and Description |
---|---|
boolean |
canAggregateTransformedStream()
Indicates if the content generated when
Pipe.Transformer.transform(InputStream, OutputStream, Object) is called can
be aggregated to an other one. |
void |
transform(InputStream is,
OutputStream os,
T convertible)
Reads the stream and writes the transformed bytes.
|
public void transform(InputStream is, OutputStream os, T convertible) throws IOException
Reads the stream and writes the transformed bytes.
transform
in interface Pipe.Transformer<T>
is
- the inputos
- the outputconvertible
- the object that provides the original input streamIOException
- if an I/O error occurspublic boolean canAggregateTransformedStream()
Indicates if the content generated when Pipe.Transformer.transform(InputStream, OutputStream, Object)
is called can
be aggregated to an other one. This is usually the case but won't be possible for instance when a magic
number should appears only at the beginning of the composite stream and not in each stream of the aggregation.
canAggregateTransformedStream
in interface Pipe.Transformer<T>
true
if aggregation is possible, false
otherwiseCopyright © 2012-2015. All Rights Reserved.