Class SSLManagedBuffer.DynamicBuffer

java.lang.Object
org.apache.hc.core5.reactor.ssl.SSLManagedBuffer
org.apache.hc.core5.reactor.ssl.SSLManagedBuffer.DynamicBuffer
Enclosing class:
SSLManagedBuffer

static final class SSLManagedBuffer.DynamicBuffer extends SSLManagedBuffer
  • Field Details

    • wrapped

      private ByteBuffer wrapped
    • length

      private final int length
  • Constructor Details

    • DynamicBuffer

      public DynamicBuffer(int size)
  • Method Details

    • acquire

      public ByteBuffer acquire()
      Description copied from class: SSLManagedBuffer
      Allocates the resources required for this buffer, or returns the resources already allocated for this buffer. Unless SSLManagedBuffer.release() is called, multiple invocations to this method must return the same ByteBuffer.
      Specified by:
      acquire in class SSLManagedBuffer
      Returns:
      buffer
    • release

      public void release()
      Description copied from class: SSLManagedBuffer
      Releases the resources for this buffer. If the buffer has already been released, this method does nothing.
      Specified by:
      release in class SSLManagedBuffer
    • isAcquired

      public boolean isAcquired()
      Description copied from class: SSLManagedBuffer
      Tests to see if this buffer has been acquired.
      Specified by:
      isAcquired in class SSLManagedBuffer
      Returns:
      true if the buffer is acquired, otherwise false
    • hasData

      public boolean hasData()
      Description copied from class: SSLManagedBuffer
      Tests to make sure that the buffer has been acquired and the underlying buffer has a position larger than 0. Essentially the same as isAquired() && acquire().position > 0.
      Specified by:
      hasData in class SSLManagedBuffer
      Returns:
      true if the buffer has been acquired and the underlying buffer's position is > 0, otherwise false