public class SSLEngineResult extends Object
SSLEngine produced
by the wrap() and unwrap() operations.| Modifier and Type | Class and Description |
|---|---|
static class |
SSLEngineResult.HandshakeStatus
The
enum describing the state of the current handshake. |
static class |
SSLEngineResult.Status
The
enum describing the result of the SSLEngine
operation. |
| Constructor and Description |
|---|
SSLEngineResult(SSLEngineResult.Status status,
SSLEngineResult.HandshakeStatus handshakeStatus,
int bytesConsumed,
int bytesProduced)
Creates a new
SSLEngineResult instance with the specified state
values. |
| Modifier and Type | Method and Description |
|---|---|
int |
bytesConsumed()
Returns the number of bytes retrieved from the source buffer(s).
|
int |
bytesProduced()
Returns the number of bytes transferred to the destination buffer(s).
|
SSLEngineResult.HandshakeStatus |
getHandshakeStatus()
Returns the status of the current handshake.
|
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.
|
public SSLEngineResult(SSLEngineResult.Status status, SSLEngineResult.HandshakeStatus handshakeStatus, int bytesConsumed, int bytesProduced)
SSLEngineResult instance with the specified state
values.status - the return value of the SSLEngine operation.handshakeStatus - the status of the current handshakebytesConsumed - the number of bytes retrieved from the source buffer(s).bytesProduced - the number of bytes transferred to the destination buffer(s).IllegalArgumentException - if status or handshakeStatus is null,
or if bytesConsumed or bytesProduces are
negative.public final SSLEngineResult.Status getStatus()
SSLEngine operation.SSLEngine operation.public final SSLEngineResult.HandshakeStatus getHandshakeStatus()
public final int bytesConsumed()
public final int bytesProduced()
public String toString()
ObjectgetClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString method
if you intend implementing your own toString method.