Top Fields Constructors Methods
org.apache.hc.core5.http.nio.support.classic

pack-priv abstract Class AbstractSharedBuffer

extends ExpandableBuffer
Class Inheritance
Known Direct Subclasses
org.apache.hc.core5.http.nio.support.classic.SharedInputBuffer, org.apache.hc.core5.http.nio.support.classic.SharedOutputBuffer
Annotations
@Contract
threading:SAFE
Imports
java.util.concurrent.locks.Condition, .ReentrantLock, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.impl.nio.ExpandableBuffer, org.apache.hc.core5.util.Args

Since
5.0

Field Summary

Modifier and TypeField and Description
pack-priv volatile boolean
pack-priv final Condition
pack-priv volatile boolean
pack-priv final ReentrantLock

Constructor Summary

AccessConstructor and Description
public
AbstractSharedBuffer(final ReentrantLock lock, final int initialBufferSize)

Method Summary

Modifier and TypeMethod and Description
public void
public int
capacity()

Overrides org.apache.hc.core5.http.impl.nio.ExpandableBuffer.capacity.

Returns available capacity of this buffer.
public boolean
hasData()

Overrides org.apache.hc.core5.http.impl.nio.ExpandableBuffer.hasData.

Determines if the buffer contains data.
public boolean
public int
length()

Overrides org.apache.hc.core5.http.impl.nio.ExpandableBuffer.length.

Returns the length of this buffer.
public void
Inherited from org.apache.hc.core5.http.impl.nio.ExpandableBuffer:
bufferclearensureAdjustedCapacityensureCapacityexpandmodesetInputModesetOutputModetoString

Field Detail

abortedback to summary
pack-priv volatile boolean aborted
conditionback to summary
pack-priv final Condition condition
endStreamback to summary
pack-priv volatile boolean endStream
lockback to summary
pack-priv final ReentrantLock lock

Constructor Detail

AbstractSharedBufferback to summary
public AbstractSharedBuffer(final ReentrantLock lock, final int initialBufferSize)

Method Detail

abortback to summary
public void abort()
capacityback to summary
public int capacity()

Overrides org.apache.hc.core5.http.impl.nio.ExpandableBuffer.capacity.

Doc from org.apache.hc.core5.http.impl.nio.ExpandableBuffer.capacity.

Returns available capacity of this buffer.

Returns:int

buffer length.

Annotations
@Override
hasDataback to summary
public boolean hasData()

Overrides org.apache.hc.core5.http.impl.nio.ExpandableBuffer.hasData.

Doc from org.apache.hc.core5.http.impl.nio.ExpandableBuffer.hasData.

Determines if the buffer contains data.

Sets the mode to output.

Returns:boolean

true if there is data in the buffer, false otherwise.

Annotations
@Override
isEndStreamback to summary
public boolean isEndStream()
lengthback to summary
public int length()

Overrides org.apache.hc.core5.http.impl.nio.ExpandableBuffer.length.

Doc from org.apache.hc.core5.http.impl.nio.ExpandableBuffer.length.

Returns the length of this buffer.

Sets the mode to output.

Returns:int

buffer length.

Annotations
@Override
resetback to summary
public void reset()