Class ContentSourceTransformer

java.lang.Object
org.eclipse.jetty.io.content.ContentSourceTransformer
All Implemented Interfaces:
Content.Source

public abstract class ContentSourceTransformer extends Object implements Content.Source

This abstract Content.Source wraps another Content.Source and implementers need only to implement the transform(Content.Chunk) method, which is used to transform Content.Chunk read from the wrapped source.

The demand(Runnable) conversation is passed directly to the wrapped Content.Source, which means that transformations that may fully consume bytes read can result in a null return from Content.Source.read() even after a callback to the demand Runnable (as per spurious invocation in Content.Source.demand(Runnable).