Package org.apache.hc.core5.reactor.ssl
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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.hc.core5.reactor.ssl.SSLManagedBuffer
SSLManagedBuffer.DynamicBuffer, SSLManagedBuffer.StaticBuffer
-
-
Constructor Summary
Constructors Constructor Description DynamicBuffer(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBuffer
acquire()
Allocates the resources required for this buffer, or returns the resources already allocated for this buffer.boolean
hasData()
Tests to make sure that the buffer has been acquired and the underlying buffer has a position larger than0
.boolean
isAcquired()
Tests to see if this buffer has been acquired.void
release()
Releases the resources for this buffer.-
Methods inherited from class org.apache.hc.core5.reactor.ssl.SSLManagedBuffer
create
-
-
-
-
Method Detail
-
acquire
public java.nio.ByteBuffer acquire()
Description copied from class:SSLManagedBuffer
Allocates the resources required for this buffer, or returns the resources already allocated for this buffer. UnlessSSLManagedBuffer.release()
is called, multiple invocations to this method must return the sameByteBuffer
.- Specified by:
acquire
in classSSLManagedBuffer
- 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 classSSLManagedBuffer
-
isAcquired
public boolean isAcquired()
Description copied from class:SSLManagedBuffer
Tests to see if this buffer has been acquired.- Specified by:
isAcquired
in classSSLManagedBuffer
- Returns:
true
if the buffer is acquired, otherwisefalse
-
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 than0
. Essentially the same asisAquired() && acquire().position > 0
.- Specified by:
hasData
in classSSLManagedBuffer
- Returns:
true
if the buffer has been acquired and the underlying buffer's position is> 0
, otherwisefalse
-
-