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.ByteBufferacquire()Allocates the resources required for this buffer, or returns the resources already allocated for this buffer.booleanhasData()Tests to make sure that the buffer has been acquired and the underlying buffer has a position larger than0.booleanisAcquired()Tests to see if this buffer has been acquired.voidrelease()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:SSLManagedBufferAllocates 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:
acquirein classSSLManagedBuffer- Returns:
- buffer
-
release
public void release()
Description copied from class:SSLManagedBufferReleases the resources for this buffer. If the buffer has already been released, this method does nothing.- Specified by:
releasein classSSLManagedBuffer
-
isAcquired
public boolean isAcquired()
Description copied from class:SSLManagedBufferTests to see if this buffer has been acquired.- Specified by:
isAcquiredin classSSLManagedBuffer- Returns:
trueif the buffer is acquired, otherwisefalse
-
hasData
public boolean hasData()
Description copied from class:SSLManagedBufferTests 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:
hasDatain classSSLManagedBuffer- Returns:
trueif the buffer has been acquired and the underlying buffer's position is> 0, otherwisefalse
-
-