Added in API level 1

SSLEngineResult

public class SSLEngineResult
extends Object

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


An encapsulation of the result state produced by SSLEngine 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.

Summary

Public constructors

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

Initializes a new instance of this class.

Public methods

final int bytesConsumed()

Returns the number of bytes consumed from the input buffer.

final int bytesProduced()

Returns the number of bytes written to the output buffer.

final SSLEngineResult.HandshakeStatus getHandshakeStatus()

Gets the handshake status of this SSLEngine operation.

final SSLEngineResult.Status getStatus()

Gets the return value of this SSLEngine operation.

String toString()

Returns a String representation of this object.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

SSLEngineResult

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

Initializes a new instance of this class.

Parameters
status SSLEngineResult.Status: the return value of the operation.

handshakeStatus SSLEngineResult.HandshakeStatus: the current handshaking status.

bytesConsumed int: the number of bytes consumed from the source ByteBuffer

bytesProduced int: the number of bytes placed into the destination ByteBuffer

Throws
IllegalArgumentException if the status or handshakeStatus arguments are null, or if bytesConsumed or bytesProduced is negative.

Public methods

bytesConsumed

Added in API level 1
public final int bytesConsumed ()

Returns the number of bytes consumed from the input buffer.

Returns
int the number of bytes consumed.

bytesProduced

Added in API level 1
public final int bytesProduced ()

Returns the number of bytes written to the output buffer.

Returns
int the number of bytes produced

getHandshakeStatus

Added in API level 1
public final SSLEngineResult.HandshakeStatus getHandshakeStatus ()

Gets the handshake status of this SSLEngine operation.

Returns
SSLEngineResult.HandshakeStatus the handshake status

getStatus

Added in API level 1
public final SSLEngineResult.Status getStatus ()

Gets the return value of this SSLEngine operation.

Returns
SSLEngineResult.Status the return value

toString

Added in API level 1
public String toString ()

Returns a String representation of this object.

Returns
String a string representation of the object.