com.sun.grizzly.util
Class SSLOutputWriter

java.lang.Object
  extended by com.sun.grizzly.util.SSLOutputWriter

public final class SSLOutputWriter
extends Object

SSL over NIO utility to encrypt ByteBuffer and flush them. All the SSLEngine operations are delegated to class SSLUtils

Author:
Jeanfrancois Arcand

Constructor Summary
SSLOutputWriter()
           
 
Method Summary
static long flushChannel(SelectableChannel channel, ByteBuffer bb)
          Encrypt the response and flush it using OutputWriter
static long flushChannel(SelectableChannel channel, ByteBuffer bb, ByteBuffer outputBB, SSLEngine sslEngine)
          Encrypt the response and flush it using OutputWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSLOutputWriter

public SSLOutputWriter()
Method Detail

flushChannel

public static long flushChannel(SelectableChannel channel,
                                ByteBuffer bb)
                         throws IOException
Encrypt the response and flush it using OutputWriter

Parameters:
channel - SelectableChannel to flush
bb - ByteBuffer
Returns:
number of bytes written
Throws:
IOException

flushChannel

public static long flushChannel(SelectableChannel channel,
                                ByteBuffer bb,
                                ByteBuffer outputBB,
                                SSLEngine sslEngine)
                         throws IOException
Encrypt the response and flush it using OutputWriter

Parameters:
channel - SelectableChannel to flush
bb - input ByteBuffer
outputBB - output ByteBuffer
sslEngine - SSLEngine
Returns:
number of bytes written
Throws:
IOException


Copyright © 2011 SUN Microsystems. All Rights Reserved.