Class BufferStateManager

java.lang.Object
org.apache.nifi.remote.io.socket.BufferStateManager

public class BufferStateManager extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • ensureSize

      public void ensureSize(int requiredSize)
      Ensures that the buffer is at least as big as the size specified, resizing the buffer if necessary. This operation MAY change the direction of the buffer.
      Parameters:
      requiredSize - the desired size of the buffer
    • prepareForWrite

      public ByteBuffer prepareForWrite(int requiredSize)
    • prepareForRead

      public ByteBuffer prepareForRead(int requiredSize)
    • clear

      public void clear()
      Clears the contents of the buffer and sets direction to WRITE
    • compact

      public void compact()