Class InputBuffer<T,​S,​X extends java.lang.Throwable>

  • Type Parameters:
    T - result type
    S - state type
    X - exception which can be thrown upon completion
    All Implemented Interfaces:
    java.lang.Cloneable

    public class InputBuffer<T,​S,​X extends java.lang.Throwable>
    extends java.lang.Object
    implements java.lang.Cloneable
    Class to handle buffering data prior to passing it through to the native code. It buffers it up into fewer (larger) chunks to avoid incurring marshalling overhead. The first time a handler is called it will be an InitialUpdate handler (if present). All subsequent calls are guaranteed to go to standard Update handlers. If all of the data can be buffered prior to calling doFinal(), then this class will attempt to use the SinglePass handler if available.

    The following handlers must be set.

    All ByteBuffer handlers default to calling their InputBuffer.ArrayStateConsumer equivalents. All InitialUpdate handlers default to calling their Update equivalents. withSinglePass(ArrayFunction) defaults to calling the update and doFinal steps.