src/share/classes/javax/net/ssl/SSLEngine.java

Print this page

        

*** 209,219 **** * were to return a {@link SSLEngineResult.Status#BUFFER_UNDERFLOW}, the * application should call {@link SSLSession#getPacketBufferSize()} to ensure * that the source buffer has enough room to hold a record (enlarging if * necessary), and then obtain more inbound data. * ! * <pre> * SSLEngineResult r = engine.unwrap(src, dst); * switch (r.getStatus()) { * BUFFER_OVERFLOW: * // Could attempt to drain the dst buffer of any already obtained * // data, but we'll just increase it to the size needed. --- 209,219 ---- * were to return a {@link SSLEngineResult.Status#BUFFER_UNDERFLOW}, the * application should call {@link SSLSession#getPacketBufferSize()} to ensure * that the source buffer has enough room to hold a record (enlarging if * necessary), and then obtain more inbound data. * ! * <pre>{@code * SSLEngineResult r = engine.unwrap(src, dst); * switch (r.getStatus()) { * BUFFER_OVERFLOW: * // Could attempt to drain the dst buffer of any already obtained * // data, but we'll just increase it to the size needed.
*** 236,246 **** * // Obtain more inbound network data for src, * // then retry the operation. * break; * // other cases: CLOSED, OK. * } ! * </pre> * * <P> * Unlike <code>SSLSocket</code>, all methods of SSLEngine are * non-blocking. <code>SSLEngine</code> implementations may * require the results of tasks that may take an extended period of --- 236,246 ---- * // Obtain more inbound network data for src, * // then retry the operation. * break; * // other cases: CLOSED, OK. * } ! * }</pre> * * <P> * Unlike <code>SSLSocket</code>, all methods of SSLEngine are * non-blocking. <code>SSLEngine</code> implementations may * require the results of tasks that may take an extended period of
*** 440,450 **** * 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 --- 440,450 ---- * 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
*** 476,486 **** * An invocation of this method behaves in exactly the same manner * as the invocation: * <blockquote><pre> * {@link #wrap(ByteBuffer [], int, int, ByteBuffer) * engine.wrap(srcs, 0, srcs.length, dst);} ! * </pre</blockquote> * * @param srcs * an array of <code>ByteBuffers</code> containing the * outbound application data * @param dst --- 476,486 ---- * An invocation of this method behaves in exactly the same manner * as the invocation: * <blockquote><pre> * {@link #wrap(ByteBuffer [], int, int, ByteBuffer) * engine.wrap(srcs, 0, srcs.length, dst);} ! * </pre></blockquote> * * @param srcs * an array of <code>ByteBuffers</code> containing the * outbound application data * @param dst
*** 595,605 **** * An invocation of this method behaves in exactly the same manner * as the invocation: * <blockquote><pre> * {@link #unwrap(ByteBuffer, ByteBuffer [], int, int) * engine.unwrap(src, new ByteBuffer [] { dst }, 0, 1);} ! * </pre</blockquote> * * @param src * a <code>ByteBuffer</code> containing inbound network data. * @param dst * a <code>ByteBuffer</code> to hold inbound application data. --- 595,605 ---- * An invocation of this method behaves in exactly the same manner * as the invocation: * <blockquote><pre> * {@link #unwrap(ByteBuffer, ByteBuffer [], int, int) * engine.unwrap(src, new ByteBuffer [] { dst }, 0, 1);} ! * </pre></blockquote> * * @param src * a <code>ByteBuffer</code> containing inbound network data. * @param dst * a <code>ByteBuffer</code> to hold inbound application data.
*** 631,641 **** * An invocation of this method behaves in exactly the same manner * as the invocation: * <blockquote><pre> * {@link #unwrap(ByteBuffer, ByteBuffer [], int, int) * engine.unwrap(src, dsts, 0, dsts.length);} ! * </pre</blockquote> * * @param src * a <code>ByteBuffer</code> containing inbound network data. * @param dsts * an array of <code>ByteBuffer</code>s to hold inbound --- 631,641 ---- * An invocation of this method behaves in exactly the same manner * as the invocation: * <blockquote><pre> * {@link #unwrap(ByteBuffer, ByteBuffer [], int, int) * engine.unwrap(src, dsts, 0, dsts.length);} ! * </pre></blockquote> * * @param src * a <code>ByteBuffer</code> containing inbound network data. * @param dsts * an array of <code>ByteBuffer</code>s to hold inbound