public class

SSLEngineResult

extends Object
java.lang.Object
   ↳ javax.net.ssl.SSLEngineResult

Class Overview

The result object describing the state of the SSLEngine produced by the wrap() and unwrap() operations.

Summary

Nested Classes
public class SSLEngineResult.HandshakeStatus The enum describing the state of the current handshake. 
public class SSLEngineResult.Status The enum describing the result of the SSLEngine operation. 
Public Constructors
SSLEngineResult(SSLEngineResult.Status status, SSLEngineResult.HandshakeStatus handshakeStatus, int bytesConsumed, int bytesProduced)
Creates a new SSLEngineResult instance with the specified state values.
Public Methods
final int bytesConsumed()
Returns the number of bytes retrieved from the source buffer(s).
final int bytesProduced()
Returns the number of bytes transferred to the destination buffer(s).
final SSLEngineResult.HandshakeStatus getHandshakeStatus()
Returns the status of the current handshake.
final SSLEngineResult.Status getStatus()
Returns the return value of the SSLEngine operation.
String toString()
Returns a string representation of this instance.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SSLEngineResult (SSLEngineResult.Status status, SSLEngineResult.HandshakeStatus handshakeStatus, int bytesConsumed, int bytesProduced)

Creates a new SSLEngineResult instance with the specified state values.

Parameters
status the return value of the SSLEngine operation.
handshakeStatus the status of the current handshake
bytesConsumed the number of bytes retrieved from the source buffer(s).
bytesProduced the number of bytes transferred to the destination buffer(s).
Throws
IllegalArgumentException if status or handshakeStatus is null, or if bytesConsumed or bytesProduces are negative.

Public Methods

public final int bytesConsumed ()

Returns the number of bytes retrieved from the source buffer(s).

Returns
  • the number of bytes retrieved from the source buffer(s).

public final int bytesProduced ()

Returns the number of bytes transferred to the destination buffer(s).

Returns
  • the number of bytes transferred to the destination buffer(s).

public final SSLEngineResult.HandshakeStatus getHandshakeStatus ()

Returns the status of the current handshake.

Returns
  • the status of the current handshake.

public final SSLEngineResult.Status getStatus ()

Returns the return value of the SSLEngine operation.

Returns
  • the return value of the SSLEngine operation.

public String toString ()

Returns a string representation of this instance.

Returns
  • a string representation of this instance.