public class FrameHeaderRfc6455 extends Object implements FrameHeader
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
fragmented
The fragmented.
|
protected int |
headerLength
The header length.
|
protected boolean |
mask
The mask
|
protected FrameBuilderRfc6455.Opcode |
opcode
The opcode.
|
protected long |
payloadLength
The payload length.
|
protected FrameBuilderRfc6455.PayloadLengthType |
payloadLengthType
The payload length type.
|
protected FrameBuilderRfc6455.Opcode |
realOpcode
The real opcode.
|
| Constructor and Description |
|---|
FrameHeaderRfc6455(boolean fragmented,
int headerLength,
FrameBuilderRfc6455.PayloadLengthType payloadLengthType,
long payloadLength,
FrameBuilderRfc6455.Opcode opcode)
Instantiates a new frame header draft06.
|
FrameHeaderRfc6455(boolean fragmented,
int headerLength,
FrameBuilderRfc6455.PayloadLengthType payloadLengthType,
long payloadLength,
FrameBuilderRfc6455.Opcode opcode,
FrameBuilderRfc6455.Opcode realOpcode)
Instantiates a new frame header draft06.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getContentsLength()
Gets the contents length.
|
long |
getFrameLength()
Gets the frame length.
|
int |
getHeaderLength()
Gets the header length.
|
FrameBuilderRfc6455.Opcode |
getOpcode()
Gets the opcode.
|
FrameBuilderRfc6455.Opcode |
getRealOpcode()
If opcode is CONTINUATION, real opcode has previous non-CONTINUATION opcode
or not real opcode is null.
|
boolean |
isContinuation()
Checks if is continuation.
|
boolean |
isFragmented()
Checks if is fragmented.
|
void |
setMask(boolean mask)
set mask
|
ByteBuffer |
toByteBuffer()
To byte buffer.
|
protected final long payloadLength
protected final FrameBuilderRfc6455.PayloadLengthType payloadLengthType
protected final int headerLength
protected final boolean fragmented
protected final FrameBuilderRfc6455.Opcode opcode
protected FrameBuilderRfc6455.Opcode realOpcode
protected boolean mask
public FrameHeaderRfc6455(boolean fragmented,
int headerLength,
FrameBuilderRfc6455.PayloadLengthType payloadLengthType,
long payloadLength,
FrameBuilderRfc6455.Opcode opcode)
fragmented - the fragmentedheaderLength - the header lengthpayloadLengthType - the payload length typepayloadLength - the payload lengthopcode - the opcodepublic FrameHeaderRfc6455(boolean fragmented,
int headerLength,
FrameBuilderRfc6455.PayloadLengthType payloadLengthType,
long payloadLength,
FrameBuilderRfc6455.Opcode opcode,
FrameBuilderRfc6455.Opcode realOpcode)
fragmented - the fragmentedheaderLength - the header lengthpayloadLengthType - the payload length typepayloadLength - the payload lengthopcode - the opcoderealOpcode - the real opcodepublic long getFrameLength()
FrameHeadergetFrameLength in interface FrameHeaderpublic int getHeaderLength()
public long getContentsLength()
FrameHeadergetContentsLength in interface FrameHeaderpublic boolean isFragmented()
public boolean isContinuation()
public FrameBuilderRfc6455.Opcode getOpcode()
public FrameBuilderRfc6455.Opcode getRealOpcode()
public void setMask(boolean mask)
mask - public ByteBuffer toByteBuffer()
FrameHeadertoByteBuffer in interface FrameHeaderCopyright © 2021. All rights reserved.