Record Class WebSocketFrame
java.lang.Object
java.lang.Record
cool.scx.http.peach.WebSocketFrame
public record WebSocketFrame(boolean fin, WebSocketOpCode opCode, boolean masked, int payloadLength, byte[] maskingKey, byte[] payloadData)
extends Record
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWebSocketFrame(boolean fin, WebSocketOpCode opCode, boolean masked, int payloadLength, byte[] maskingKey, byte[] payloadData) Creates an instance of aWebSocketFramerecord class.WebSocketFrame(boolean fin, WebSocketOpCode opCode, byte[] payloadData) -
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.booleanmasked()Returns the value of themaskedrecord component.byte[]Returns the value of themaskingKeyrecord component.opCode()Returns the value of theopCoderecord component.byte[]Returns the value of thepayloadDatarecord component.intReturns the value of thepayloadLengthrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WebSocketFrame
-
WebSocketFrame
public WebSocketFrame(boolean fin, WebSocketOpCode opCode, boolean masked, int payloadLength, byte[] maskingKey, byte[] payloadData) Creates an instance of aWebSocketFramerecord class.- Parameters:
fin- the value for thefinrecord componentopCode- the value for theopCoderecord componentmasked- the value for themaskedrecord componentpayloadLength- the value for thepayloadLengthrecord componentmaskingKey- the value for themaskingKeyrecord componentpayloadData- the value for thepayloadDatarecord component
-
-
Method Details
-
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. -
fin
public boolean fin()Returns the value of thefinrecord component.- Returns:
- the value of the
finrecord component
-
opCode
Returns the value of theopCoderecord component.- Returns:
- the value of the
opCoderecord component
-
masked
public boolean masked()Returns the value of themaskedrecord component.- Returns:
- the value of the
maskedrecord component
-
payloadLength
public int payloadLength()Returns the value of thepayloadLengthrecord component.- Returns:
- the value of the
payloadLengthrecord component
-
maskingKey
public byte[] maskingKey()Returns the value of themaskingKeyrecord component.- Returns:
- the value of the
maskingKeyrecord component
-
payloadData
public byte[] payloadData()Returns the value of thepayloadDatarecord component.- Returns:
- the value of the
payloadDatarecord component
-