public class DataBodyParser extends BodyParser
Modifier and Type | Class and Description |
---|---|
private static class |
DataBodyParser.State |
Modifier and Type | Field and Description |
---|---|
private int |
length |
private int |
padding |
private int |
paddingLength |
private DataBodyParser.State |
state |
LOG
Constructor and Description |
---|
DataBodyParser(HeaderParser headerParser,
Parser.Listener listener) |
Modifier and Type | Method and Description |
---|---|
protected void |
emptyBody(java.nio.ByteBuffer buffer) |
private void |
onData(java.nio.ByteBuffer buffer,
boolean fragment,
int padding) |
boolean |
parse(java.nio.ByteBuffer buffer)
Parses the body bytes in the given
buffer ; only the body
bytes are consumed, therefore when this method returns, the buffer
may contain unconsumed bytes. |
private void |
reset() |
connectionFailure, getBodyLength, getStreamId, hasFlag, isEndStream, isPadding, notifyData, notifyGoAway, notifyHeaders, notifyPing, notifyPriority, notifyPushPromise, notifyReset, notifySettings, notifyWindowUpdate, streamFailure
private DataBodyParser.State state
private int padding
private int paddingLength
private int length
public DataBodyParser(HeaderParser headerParser, Parser.Listener listener)
private void reset()
protected void emptyBody(java.nio.ByteBuffer buffer)
emptyBody
in class BodyParser
public boolean parse(java.nio.ByteBuffer buffer)
BodyParser
Parses the body bytes in the given buffer
; only the body
bytes are consumed, therefore when this method returns, the buffer
may contain unconsumed bytes.
parse
in class BodyParser
buffer
- the buffer to parseprivate void onData(java.nio.ByteBuffer buffer, boolean fragment, int padding)