SSLEngineResult (Java SE 15 & JDK 15) (original) (raw)


public class SSLEngineResult extends Object

An encapsulation of the result state produced bySSLEngine I/O calls.

A SSLEngine provides a means for establishing secure communication sessions between two peers. SSLEngine operations typically consume bytes from an input buffer and produce bytes in an output buffer. This class provides operational result values describing the state of the SSLEngine, including indications of what operations are needed to finish an ongoing handshake. Lastly, it reports the number of bytes consumed and produced as a result of this operation.

Since:

1.5

See Also:

SSLEngine, SSLEngine.wrap(ByteBuffer, ByteBuffer), SSLEngine.unwrap(ByteBuffer, ByteBuffer)

Nested Classes

Modifier and Type Class Description
static class SSLEngineResult.HandshakeStatus An SSLEngineResult enum describing the current handshaking state of this SSLEngine.
static class SSLEngineResult.Status An SSLEngineResult enum describing the overall result of the SSLEngine operation.
Modifier and Type Method Description
int bytesConsumed() Returns the number of bytes consumed from the input buffer.
int bytesProduced() Returns the number of bytes written to the output buffer.
SSLEngineResult.HandshakeStatus getHandshakeStatus() Gets the handshake status of this SSLEngine operation.
SSLEngineResult.Status getStatus() Gets the return value of this SSLEngine operation.
long sequenceNumber() Returns the sequence number of the produced or consumed SSL/TLS/DTLS record (optional operation).
String toString() Returns a String representation of this object.