Package javax.net.ssl
Class SSLEngineResult
java.lang.Object
javax.net.ssl.SSLEngineResult
public class SSLEngineResult extends Object
The result object describing the state of the
SSLEngine produced
by the wrap() and unwrap() operations.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSSLEngineResult.HandshakeStatusTheenumdescribing the state of the current handshake.static classSSLEngineResult.StatusTheenumdescribing the result of theSSLEngineoperation. -
Constructor Summary
Constructors Constructor Description SSLEngineResult(SSLEngineResult.Status status, SSLEngineResult.HandshakeStatus handshakeStatus, int bytesConsumed, int bytesProduced)Creates a newSSLEngineResultinstance with the specified state values. -
Method Summary
Modifier and Type Method Description intbytesConsumed()Returns the number of bytes retrieved from the source buffer(s).intbytesProduced()Returns the number of bytes transferred to the destination buffer(s).SSLEngineResult.HandshakeStatusgetHandshakeStatus()Returns the status of the current handshake.SSLEngineResult.StatusgetStatus()Returns the return value of theSSLEngineoperation.StringtoString()Returns a string containing a concise, human-readable description of this object.
-
Constructor Details
-
SSLEngineResult
public SSLEngineResult(SSLEngineResult.Status status, SSLEngineResult.HandshakeStatus handshakeStatus, int bytesConsumed, int bytesProduced)Creates a newSSLEngineResultinstance with the specified state values.- Parameters:
status- the return value of theSSLEngineoperation.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).- Throws:
IllegalArgumentException- ifstatusorhandshakeStatusisnull, or ifbytesConsumedorbytesProducesare negative.
-
-
Method Details
-
getStatus
Returns the return value of theSSLEngineoperation.- Returns:
- the return value of the
SSLEngineoperation.
-
getHandshakeStatus
Returns the status of the current handshake.- Returns:
- the status of the current handshake.
-
bytesConsumed
public final int bytesConsumed()Returns the number of bytes retrieved from the source buffer(s).- Returns:
- the number of bytes retrieved from the source buffer(s).
-
bytesProduced
public final int bytesProduced()Returns the number of bytes transferred to the destination buffer(s).- Returns:
- the number of bytes transferred to the destination buffer(s).
-
toString
Description copied from class:ObjectReturns 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
toStringmethod if you intend implementing your owntoStringmethod.
-