Character Reader Demux Transform Pipeline Item

A character reader demux transform pipeline item is a demupltiplexer that takes a character stream as input and generates a sequence of character streams as output. In order to facilitate a custom transform of the character stream, the user has to specify in a JSR-223 compliant script, the implementation of the following functions:

public abstract char[] transformBuffer(char[] buffer, int offset, int length);

public abstract boolean shouldChangePipeline();

The transformBuffer() method will be called each time a buffer is read in order for the script implementation to transform it as needed. The additional shouldChangePipeline method should return true, when the boundaries of one result stream has been reached and another should be started. The transformBuffer() method is going to be called with a length parameter of -1 when the end of the input stream is reached.