Top Fields Constructors Methods
jdk.internal.net.http.websocket

public Class MessageEncoder

extends Object
Class Inheritance
Imports
jdk.internal.net.http.common.Logger, .Utils, jdk.internal.net.http.websocket.Frame.Opcode, java.io.IOException, java.nio.ByteBuffer, .CharBuffer, java.nio.charset.CharacterCodingException, .CharsetEncoder, .CoderResult, .CodingErrorAction, .StandardCharsets, java.security.SecureRandom

Field Summary

Modifier and TypeField and Description
private int
private final CharsetEncoder
private boolean
private static final Logger
private int
private boolean
private final ByteBuffer
private long
private final Frame.HeaderWriter
private final ByteBuffer
private final SecureRandom
private boolean
private final Frame.Masker
private boolean
private boolean
private final boolean
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
MessageEncoder(boolean isServer)

Method Summary

Modifier and TypeMethod and Description
protected ByteBuffer
public boolean
encodeBinary(ByteBuffer src, boolean last, ByteBuffer dst)

public boolean
encodeClose(int statusCode, CharBuffer reason, ByteBuffer dst)

public boolean
public boolean
public boolean
encodeText(CharBuffer src, boolean last, ByteBuffer dst)

private int
private boolean
public void
private void
setupHeader(Frame.Opcode opcode, boolean fin, long payloadLen)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

actualLenback to summary
private int actualLen
charsetEncoderback to summary
private final CharsetEncoder charsetEncoder
closedback to summary
private boolean closed
debugback to summary
private static final Logger debug
expectedLenback to summary
private int expectedLen
flushingback to summary
private boolean flushing
headerBufferback to summary
private final ByteBuffer headerBuffer
headerCountback to summary
private long headerCount
headerWriterback to summary
private final Frame.HeaderWriter headerWriter
intermediateBufferback to summary
private final ByteBuffer intermediateBuffer
maskingKeySourceback to summary
private final SecureRandom maskingKeySource
moreTextback to summary
private boolean moreText
payloadMaskerback to summary
private final Frame.Masker payloadMasker
previousFinback to summary
private boolean previousFin
previousTextback to summary
private boolean previousText
serverback to summary
private final boolean server
startedback to summary
private boolean started

Constructor Detail

MessageEncoderback to summary
pack-priv MessageEncoder()
MessageEncoderback to summary
pack-priv MessageEncoder(boolean isServer)

Method Detail

createIntermediateBufferback to summary
protected ByteBuffer createIntermediateBuffer(int minSize)
encodeBinaryback to summary
public boolean encodeBinary(ByteBuffer src, boolean last, ByteBuffer dst) throws IOException
encodeCloseback to summary
public boolean encodeClose(int statusCode, CharBuffer reason, ByteBuffer dst) throws IOException
encodePingback to summary
public boolean encodePing(ByteBuffer src, ByteBuffer dst) throws IOException
encodePongback to summary
public boolean encodePong(ByteBuffer src, ByteBuffer dst) throws IOException
encodeTextback to summary
public boolean encodeText(CharBuffer src, boolean last, ByteBuffer dst) throws IOException
maskAvailableback to summary
private int maskAvailable(ByteBuffer src, ByteBuffer dst)
putAvailableback to summary
private boolean putAvailable(ByteBuffer src, ByteBuffer dst)
resetback to summary
public void reset()
setupHeaderback to summary
private void setupHeader(Frame.Opcode opcode, boolean fin, long payloadLen)