This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.net.ssl
class SSLEngineResult

java.lang.Object extended by javax.net.ssl.SSLEngineResult

Most common ways to construct:

SSLEngine sslEngine = …;
ByteBuffer inNetBuffer = …;
ByteBuffer peerAppData = …;

SSLEngineResult res = sslEngine.unwrap(inNetBuffer, peerAppData);

Based on 20 examples

 

SSLEngine sslEngine = …;
ByteBuffer src = …;
ByteBuffer outNetBuffer = …;

SSLEngineResult result = sslEngine.wrap(src, outNetBuffer);

Based on 20 examples


public class SSLEngineResult
extends Object

An encapsulation of the result state produced by SSLEngine I/O calls.

A SSLEngine provides a means for establishing secure communication sessions between two peers. SSLEngine operations typically consume bytes from an input buffer and produce bytes in an output buffer. This class provides operational result values describing the state of the SSLEngine, including indications of what operations are needed to finish an ongoing handshake. Lastly, it reports the number of bytes consumed and produced as a result of this operation.

See Also (auto-generated):

SSLEngine

ByteBuffer

Status


Nested Class Summary
static enum

           An SSLEngineResult enum describing the current handshaking state of this SSLEngine.
static enum

           An SSLEngineResult enum describing the overall result of the SSLEngine operation.
 
Constructor Summary
SSLEngineResult(SSLEngineResult.Status status, SSLEngineResult.HandshakeStatus handshakeStatus, int bytesConsumed, int bytesProduced)

          Initializes a new instance of this class.
 
Method Summary
 int

          Returns the number of bytes consumed from the input buffer.
 int

          Returns the number of bytes written to the output buffer.
 SSLEngineResult.HandshakeStatus

          Gets the handshake status of this SSLEngine operation.
 SSLEngineResult.Status

          Gets the return value of this SSLEngine operation.
 String

          Returns a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSLEngineResult

public SSLEngineResult(SSLEngineResult.Status status,
                       SSLEngineResult.HandshakeStatus handshakeStatus,
                       int bytesConsumed,
                       int bytesProduced)
Initializes a new instance of this class.

Parameters:
status - the return value of the operation.
handshakeStatus - the current handshaking status.
bytesConsumed - the number of bytes consumed from the source ByteBuffer
bytesProduced - the number of bytes placed into the destination ByteBuffer
Method Detail

bytesConsumed

public final int bytesConsumed()
Returns the number of bytes consumed from the input buffer.

Returns:
the number of bytes consumed.

bytesProduced

public final int bytesProduced()
Returns the number of bytes written to the output buffer.

Returns:
the number of bytes produced

getHandshakeStatus

public final SSLEngineResult.HandshakeStatus getHandshakeStatus()
Gets the handshake status of this SSLEngine operation.

Returns:
the handshake status

getStatus

public final SSLEngineResult.Status getStatus()
Gets the return value of this SSLEngine operation.

Returns:
the return value

toString

public String toString()
Returns a String representation of this object.

Overrides:
toString in class Object


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.