public class SSLEngineResult extends Object
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.Modifier and Type | Class and Description |
---|---|
static class |
SSLEngineResult.HandshakeStatus
An enumeration of possible handshake status states.
|
static class |
SSLEngineResult.Status
An enumeration of possible general states.
|
Constructor and Description |
---|
SSLEngineResult(SSLEngineResult.Status status,
SSLEngineResult.HandshakeStatus handshakeStatus,
int bytesConsumed,
int bytesProduced)
Creates a new SSL engine result.
|
Modifier and Type | Method and Description |
---|---|
int |
bytesConsumed()
Returns the number of bytes consumed by the previous operation.
|
int |
bytesProduced()
Returns the number of bytes produced by the previous operation.
|
SSLEngineResult.HandshakeStatus |
getHandshakeStatus()
Returns the handshake status.
|
SSLEngineResult.Status |
getStatus()
Returns the connection status.
|
String |
toString()
Convert this Object to a human-readable String.
|
public SSLEngineResult(SSLEngineResult.Status status, SSLEngineResult.HandshakeStatus handshakeStatus, int bytesConsumed, int bytesProduced)
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.IllegalArgumentException
- If either enum value is
null
, or if either integer is negative.public int bytesConsumed()
public int bytesProduced()
public SSLEngineResult.HandshakeStatus getHandshakeStatus()
public SSLEngineResult.Status getStatus()
public String toString()
Object
System.out.println()
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a RuntimeException
.
This method will be called when performing string
concatenation with this object. If the result is
null
, string concatenation will instead
use "null"
.
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode())
.
toString
in class Object
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)