T
- the type of convertible objectpublic static interface Pipe.Transformer<T>
This interface describes an object which is able to write into an OutputStream
some transformed bytes
read from InputStream
.
When registered with the Pipe
, the close method is invoked transparently.
That transformer is also able to change the state of on 'convertible' object identified as the origin of the source input stream.
Modifier and Type | Method and Description |
---|---|
boolean |
canAggregateTransformedStream()
Indicates if the content generated when
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.
|
void transform(InputStream is, OutputStream os, T convertible) throws IOException
Reads the stream and writes the transformed bytes.
is
- the inputos
- the outputconvertible
- the object that provides the original input streamIOException
- if an I/O error occursboolean canAggregateTransformedStream()
Indicates if the content generated when 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.
true
if aggregation is possible, false
otherwiseCopyright © 2012-2015. All Rights Reserved.