Package org.apache.hc.core5.reactor.ssl
Class SSLManagedBuffer.StaticBuffer
java.lang.Object
org.apache.hc.core5.reactor.ssl.SSLManagedBuffer
org.apache.hc.core5.reactor.ssl.SSLManagedBuffer.StaticBuffer
- 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.boolean
hasData()
Tests to make sure that the buffer has been acquired and the underlying buffer has a position larger than0
.boolean
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
-
Field Details
-
buffer
-
-
Constructor Details
-
StaticBuffer
public StaticBuffer(int size)
-
-
Method Details
-
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
-