public class TransformedNut extends NutWrapper implements Serializable
A transformed nut wraps a ConvertibleNut and considers its input stream as the result of the transformation.
Consequently, not transformers will be used and no changes of the state will be accepted.
The instances could be serialized so the wrapped nut must be a Serializable.
| Constructor and Description |
|---|
TransformedNut(ConvertibleNut w)
Builds a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addReferencedNut(ConvertibleNut referenced)
Adds a new nut referenced by this nut.
|
void |
addTransformer(Pipe.Transformer transformer)
Adds a
Pipe.Transformer. |
void |
setNutName(String nutName)
Sets the nut name.
|
void |
transform(Pipe.OnReady... onReady)
Transforms the source stream with all registered transformers and calls the given callback in addition
to callbacks previously registered.
|
getName, getNutType, getOriginalNuts, getReadyCallbacks, getReferencedNuts, getTransformers, isCompressed, isDynamic, isSubResource, isTransformed, onReady, openStream, setIsCompressed, setIsSubResource, setNutTypeequals, getInitialName, getInitialNutType, getParentFile, getProxyUri, getVersionNumber, hashCode, setProxyUri, setVersionNumber, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetInitialName, getInitialNutType, getParentFile, getProxyUri, getVersionNumber, setProxyUripublic TransformedNut(ConvertibleNut w)
Builds a new instance.
w - the wrapped nutpublic void setNutName(String nutName)
Sets the nut name.
setNutName in interface ConvertibleNutsetNutName in class NutWrappernutName - the namepublic void transform(Pipe.OnReady... onReady) throws IOException
Transforms the source stream with all registered transformers and calls the given callback in addition to callbacks previously registered. The method also writes the result to the given output stream.
transform in interface ConvertibleNuttransform in class NutWrapperonReady - the callbackIOException - if an I/O error occurspublic void addTransformer(Pipe.Transformer transformer)
Adds a Pipe.Transformer.
addTransformer in interface ConvertibleNutaddTransformer in class NutWrappertransformer - the transformerpublic void addReferencedNut(ConvertibleNut referenced)
Adds a new nut referenced by this nut.
addReferencedNut in interface ConvertibleNutaddReferencedNut in class NutWrapperreferenced - the referenced nutCopyright © 2012-2015. All Rights Reserved.