public class HeaderParser
extends java.lang.Object
Parser for FastCGI frame headers.
struct frame_header { ubyte version; ubyte type; ushort requestId; ushort contentLength; ubyte paddingLength; ubyte reserved; }
Parser
Modifier and Type | Class and Description |
---|---|
private static class |
HeaderParser.State |
Modifier and Type | Field and Description |
---|---|
private int |
cursor |
private int |
length |
private static Logger |
LOG |
private int |
padding |
private int |
request |
private HeaderParser.State |
state |
private int |
type |
private int |
version |
Constructor and Description |
---|
HeaderParser() |
Modifier and Type | Method and Description |
---|---|
int |
getContentLength() |
FCGI.FrameType |
getFrameType() |
int |
getPaddingLength() |
int |
getRequest() |
boolean |
parse(java.nio.ByteBuffer buffer)
Parses the bytes in the given
buffer as FastCGI header bytes |
protected void |
reset() |
private static final Logger LOG
private HeaderParser.State state
private int cursor
private int version
private int type
private int request
private int length
private int padding
public boolean parse(java.nio.ByteBuffer buffer)
buffer
as FastCGI header bytesbuffer
- the bytes to parsepublic FCGI.FrameType getFrameType()
public int getRequest()
public int getContentLength()
public int getPaddingLength()
protected void reset()