Record Class WebSocketFrame
java.lang.Object
java.lang.Record
cool.scx.websocket.WebSocketFrame
public record WebSocketFrame(WebSocketOpCode opCode, byte[] payloadData, boolean fin)
extends Record
WebSocketFrame
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
ConstructorsConstructorDescriptionWebSocketFrame(WebSocketOpCode opCode, byte[] payloadData, boolean fin) Creates an instance of aWebSocketFramerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanfin()Returns the value of thefinrecord component.final inthashCode()Returns a hash code value for this object.static WebSocketFrameof(WebSocketOpCode opCode, byte[] payloadData) static WebSocketFrameof(WebSocketOpCode opCode, byte[] payloadData, boolean fin) opCode()Returns the value of theopCoderecord component.byte[]Returns the value of thepayloadDatarecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WebSocketFrame
Creates an instance of aWebSocketFramerecord class.- Parameters:
opCode- the value for theopCoderecord componentpayloadData- the value for thepayloadDatarecord componentfin- the value for thefinrecord component
-
-
Method Details
-
of
-
of
-
getCloseInfo
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
opCode
Returns the value of theopCoderecord component.- Returns:
- the value of the
opCoderecord component
-
payloadData
public byte[] payloadData()Returns the value of thepayloadDatarecord component.- Returns:
- the value of the
payloadDatarecord component
-
fin
public boolean fin()Returns the value of thefinrecord component.- Returns:
- the value of the
finrecord component
-