public class PipedConvertibleNut extends AbstractConvertibleNut
This ConvertibleNut
pipes transformers with the Pipe
class.
Modifier | Constructor and Description |
---|---|
|
PipedConvertibleNut(Nut o)
Builds a new instance.
|
protected |
PipedConvertibleNut(String name,
NutType ft,
Future<Long> v,
Boolean comp)
Builds a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isTransformed()
Indicates if this nut is transformed or not.
|
protected void |
setTransformed(boolean transformed)
Change the state of this nut by indicating if its transformed or not.
|
static void |
transform(ConvertibleNut convertibleNut,
Set<Pipe.Transformer<ConvertibleNut>> transformers,
List<Pipe.OnReady> callbacks)
Apply transformers by chaining each transformer specified in the given list.
|
void |
transform(Pipe.OnReady... onReady)
Transforms the source stream with all registered transformers and calls the given callback in addition
to callbacks previously registered.
|
addReferencedNut, addTransformer, equals, getName, getNutType, getOriginalNuts, getParentFile, getReadyCallbacks, getReferencedNuts, getTransformers, hashCode, isCompressed, isDynamic, isSubResource, onReady, openStream, setIsCompressed, setIsSubResource, setNutName, setNutType, setOriginalNuts
getInitialName, getInitialNutType, getProxyUri, getVersionNumber, setProxyUri, setVersionNumber, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getInitialName, getInitialNutType, getProxyUri, getVersionNumber, setProxyUri
public PipedConvertibleNut(Nut o)
Builds a new instance.
o
- the transformed nutpublic static void transform(ConvertibleNut convertibleNut, Set<Pipe.Transformer<ConvertibleNut>> transformers, List<Pipe.OnReady> callbacks) throws IOException
Apply transformers by chaining each transformer specified in the given list.
convertibleNut
- nut to transformtransformers
- the transformers chaincallbacks
- callbacks to callIOException
- if transformation failspublic boolean isTransformed()
Indicates if this nut is transformed or not.
true
if transformed, false
otherwisepublic 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.
onReady
- the callbackIOException
- if an I/O error occursprotected void setTransformed(boolean transformed)
Change the state of this nut by indicating if its transformed or not.
transformed
- true
if transformed, false
otherwiseCopyright © 2012-2015. All Rights Reserved.