Serializable, Comparable<SSLEngineResult.Status>public static enum SSLEngineResult.Status extends Enum<SSLEngineResult.Status>
SSLEngineResult enum describing the overall result
of the SSLEngine operation.
The Status value does not reflect the
state of a SSLEngine handshake currently
in progress. The SSLEngineResult's HandshakeStatus
should be consulted for that information.| 枚举常量 | 说明 |
|---|---|
BUFFER_OVERFLOW |
The
SSLEngine was not able to process the
operation because there are not enough bytes available in the
destination buffer to hold the result. |
BUFFER_UNDERFLOW |
The
SSLEngine was not able to unwrap the
incoming data because there were not enough source bytes
available to make a complete packet. |
CLOSED |
The operation just closed this side of the
SSLEngine, or the operation
could not be completed because it was already closed. |
OK |
The
SSLEngine completed the operation, and
is available to process similar calls. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static SSLEngineResult.Status |
valueOf(String name) |
返回带有指定名称的该类型的枚举常量。
字符串必须与用于声明该类型的枚举常量的
标识符完全匹配。(不允许有多余
的空格字符。)
|
static SSLEngineResult.Status[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。该方法可用于迭代
常量, 如下所示:
for (SSLEngineResult.Status c : SSLEngineResult.Status.values()) System.out.println(c); |
public static final SSLEngineResult.Status BUFFER_UNDERFLOW
SSLEngine was not able to unwrap the
incoming data because there were not enough source bytes
available to make a complete packet.
Repeat the call once more bytes are available.
public static final SSLEngineResult.Status BUFFER_OVERFLOW
SSLEngine was not able to process the
operation because there are not enough bytes available in the
destination buffer to hold the result.
Repeat the call once more bytes are available.
public static final SSLEngineResult.Status OK
SSLEngine completed the operation, and
is available to process similar calls.public static final SSLEngineResult.Status CLOSED
SSLEngine, or the operation
could not be completed because it was already closed.public static SSLEngineResult.Status[] values()
for (SSLEngineResult.Status c : SSLEngineResult.Status.values()) System.out.println(c);
public static SSLEngineResult.Status valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值