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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hc.core5.reactor.ssl.SSLManagedBuffer
SSLManagedBuffer.DynamicBuffer, SSLManagedBuffer.StaticBuffer -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacquire()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.booleanTests 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
-
Field Details
-
wrapped
-
length
private final int length
-
-
Constructor Details
-
DynamicBuffer
public DynamicBuffer(int size)
-
-
Method Details
-
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
-