Class BinaryFrame
- java.lang.Object
-
- org.eclipse.jetty.websocket.common.WebSocketFrame
-
- org.eclipse.jetty.websocket.common.frames.DataFrame
-
- org.eclipse.jetty.websocket.common.frames.BinaryFrame
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.websocket.api.extensions.Frame
Frame.Type
-
-
Field Summary
-
Fields inherited from class org.eclipse.jetty.websocket.common.WebSocketFrame
data, finRsvOp, mask, masked
-
-
Constructor Summary
Constructors Constructor Description BinaryFrame()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Frame.Type
getType()
BinaryFrame
setPayload(byte[] buf)
BinaryFrame
setPayload(java.lang.String payload)
BinaryFrame
setPayload(java.nio.ByteBuffer buf)
Set the data payload.-
Methods inherited from class org.eclipse.jetty.websocket.common.frames.DataFrame
assertValid, isControlFrame, isDataFrame, setIsContinuation
-
Methods inherited from class org.eclipse.jetty.websocket.common.WebSocketFrame
copy, copyHeaders, copyHeaders, equals, getMask, getOpCode, getPayload, getPayloadAsUTF8, getPayloadLength, hashCode, hasPayload, isFin, isLast, isMasked, isRsv1, isRsv2, isRsv3, reset, setFin, setMask, setMasked, setOpCode, setRsv1, setRsv2, setRsv3, toString
-
-
-
-
Method Detail
-
setPayload
public BinaryFrame setPayload(java.nio.ByteBuffer buf)
Description copied from class:WebSocketFrame
Set the data payload.The provided buffer will be used as is, no copying of bytes performed.
The provided buffer should be flipped and ready to READ from.
- Overrides:
setPayload
in classWebSocketFrame
- Parameters:
buf
- the bytebuffer to set- Returns:
- the frame itself
-
setPayload
public BinaryFrame setPayload(byte[] buf)
-
setPayload
public BinaryFrame setPayload(java.lang.String payload)
-
getType
public Frame.Type getType()
- Specified by:
getType
in interfaceFrame
- Overrides:
getType
in classWebSocketFrame
-
-