Class ByteBufferCallbackAccumulator

java.lang.Object
org.eclipse.jetty.io.ByteBufferCallbackAccumulator

@Deprecated(forRemoval=true, since="12.1.0") public class ByteBufferCallbackAccumulator extends Object
Deprecated, for removal: This API element is subject to removal in a future version.

This class can be used to accumulate pairs of ByteBuffer and Callback, and eventually copy these into a single ByteBuffer or byte array and succeed the callbacks.

This class is not thread safe and callers must do mutual exclusion.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addEntry(ByteBuffer buffer, Callback callback)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the total length of the content in the accumulator..
    byte[]
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ByteBufferCallbackAccumulator

      public ByteBufferCallbackAccumulator()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • addEntry

      public void addEntry(ByteBuffer buffer, Callback callback)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getLength

      public int getLength()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the total length of the content in the accumulator..
      Returns:
      the total length of the content in the accumulator.
    • takeByteArray

      public byte[] takeByteArray()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      a newly allocated byte array containing all content written into the accumulator.
    • writeTo

      public void writeTo(ByteBuffer buffer)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • fail

      public void fail(Throwable t)
      Deprecated, for removal: This API element is subject to removal in a future version.