Skip to content

Most visited

Recently visited

navigation
Added in API level 1

SSLEngineResult

public class SSLEngineResult
extends Object

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


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

Summary

Nested classes

enum SSLEngineResult.HandshakeStatus

The enum describing the state of the current handshake. 

enum 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 containing a concise, human-readable description of this object.

Inherited methods

From class java.lang.Object

Public constructors

SSLEngineResult

Added in API level 1
SSLEngineResult (SSLEngineResult.Status status, 
                SSLEngineResult.HandshakeStatus handshakeStatus, 
                int bytesConsumed, 
                int bytesProduced)

Creates a new SSLEngineResult instance with the specified state values.

Parameters
status SSLEngineResult.Status: the return value of the SSLEngine operation.
handshakeStatus SSLEngineResult.HandshakeStatus: the status of the current handshake
bytesConsumed int: the number of bytes retrieved from the source buffer(s).
bytesProduced int: 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

bytesConsumed

Added in API level 1
int bytesConsumed ()

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

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

bytesProduced

Added in API level 1
int bytesProduced ()

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

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

getHandshakeStatus

Added in API level 1
SSLEngineResult.HandshakeStatus getHandshakeStatus ()

Returns the status of the current handshake.

Returns
SSLEngineResult.HandshakeStatus the status of the current handshake.

getStatus

Added in API level 1
SSLEngineResult.Status getStatus ()

Returns the return value of the SSLEngine operation.

Returns
SSLEngineResult.Status the return value of the SSLEngine operation.

toString

Added in API level 1
String toString ()

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:

   getClass().getName() + '@' + Integer.toHexString(hashCode())

See Writing a useful toString method if you intend implementing your own toString method.

Returns
String a printable representation of this object.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.