javax.net.ssl

Class SSLEngineResult

public class SSLEngineResult extends Object

A result from an {@link SSLEngine} wrap or unwrap operation. This class conveys a possibly intermediate result, and may ask for more input data or request that output data be sent over a connection.
Nested Class Summary
static classSSLEngineResult.HandshakeStatus
An enumeration of possible handshake status states.
static classSSLEngineResult.Status
An enumeration of possible general states.
Constructor Summary
SSLEngineResult(SSLEngineResult.Status status, SSLEngineResult.HandshakeStatus handshakeStatus, int bytesConsumed, int bytesProduced)
Creates a new SSL engine result.
Method Summary
intbytesConsumed()
Returns the number of bytes consumed by the previous operation.
intbytesProduced()
Returns the number of bytes produced by the previous operation.
SSLEngineResult.HandshakeStatusgetHandshakeStatus()
Returns the handshake status.
SSLEngineResult.StatusgetStatus()
Returns the connection status.
StringtoString()

Constructor Detail

SSLEngineResult

public SSLEngineResult(SSLEngineResult.Status status, SSLEngineResult.HandshakeStatus handshakeStatus, int bytesConsumed, int bytesProduced)
Creates a new SSL engine result.

Parameters: status The status of the SSL connection. handshakeStatus The status of the SSL handshake. bytesConsumed The number of bytes consumed by the previous operation. bytesProduced The number of bytes produced by the previous operation.

Throws: IllegalArgumentException If either enum value is null, or if either integer is negative.

Method Detail

bytesConsumed

public int bytesConsumed()
Returns the number of bytes consumed by the previous operation.

Returns: The number of bytes consumed.

bytesProduced

public int bytesProduced()
Returns the number of bytes produced by the previous operation.

Returns: The number of bytes produced.

getHandshakeStatus

public SSLEngineResult.HandshakeStatus getHandshakeStatus()
Returns the handshake status.

Returns: The handshake status.

getStatus

public SSLEngineResult.Status getStatus()
Returns the connection status.

Returns: The connection status.

toString

public String toString()