Class FrameInputBuffer
java.lang.Object
org.apache.hc.core5.http2.impl.nio.FrameInputBuffer
Frame input buffer for HTTP/2 non-blocking connections.
- Since:
- 5.0
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBufferprivate final byte[]private intprivate final intprivate final BasicH2TransportMetricsprivate intprivate FrameInputBuffer.Stateprivate intprivate int -
Constructor Summary
ConstructorsConstructorDescriptionFrameInputBuffer(int maxFramePayloadSize) FrameInputBuffer(BasicH2TransportMetrics metrics, int maxFramePayloadSize) FrameInputBuffer(BasicH2TransportMetrics metrics, int bufferLen, int maxFramePayloadSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidput(ByteBuffer src) Deprecated.read(ByteBuffer src, ReadableByteChannel channel) Attempts to read a complete frame from the given source buffer and the underlying data channel.read(ReadableByteChannel channel) Attempts to read a complete frame from the underlying data channel.voidreset()
-
Field Details
-
metrics
-
maxFramePayloadSize
private final int maxFramePayloadSize -
bytes
private final byte[] bytes -
buffer
-
state
-
payloadLen
private int payloadLen -
type
private int type -
flags
private int flags -
streamId
private int streamId
-
-
Constructor Details
-
FrameInputBuffer
FrameInputBuffer(BasicH2TransportMetrics metrics, int bufferLen, int maxFramePayloadSize) -
FrameInputBuffer
-
FrameInputBuffer
public FrameInputBuffer(int maxFramePayloadSize)
-
-
Method Details
-
put
Deprecated. -
read
Attempts to read a complete frame from the given source buffer and the underlying data channel. The source buffer is consumed first. More data can be read from the channel if required.- Parameters:
src- the source buffer ornullif not available.channel- the underlying data channel.- Returns:
- a complete frame or
nulla complete frame cannot be read. - Throws:
IOException- Since:
- 5.1
-
read
Attempts to read a complete frame from the underlying data channel.- Parameters:
channel- the underlying data channel.- Throws:
IOException
-
reset
public void reset() -
getMetrics
-
read(ByteBuffer, ReadableByteChannel).