SSLEngine.wrap

Attempts to encode a buffer of plaintext application data into SSL/TLS network data. <P> An invocation of this method behaves in exactly the same manner as the invocation: <blockquote><pre> {@link #wrap(ByteBuffer [], int, int, ByteBuffer) engine.wrap(new ByteBuffer [] { src }, 0, 1, dst);} </pre></blockquote>

@param src a <code>ByteBuffer</code> containing outbound application data @param dst a <code>ByteBuffer</code> to hold outbound network data @return an <code>SSLEngineResult</code> describing the result of this operation. @throws SSLException A problem was encountered while processing the data that caused the <code>SSLEngine</code> to abort. See the class description for more information on engine closure. @throws ReadOnlyBufferException if the <code>dst</code> buffer is read-only. @throws IllegalArgumentException if either <code>src</code> or <code>dst</code> is null. @throws IllegalStateException if the client/server mode has not yet been set. @see #wrap(ByteBuffer [], int, int, ByteBuffer)

Meta