Class SslEngineByteBufferOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public class SslEngineByteBufferOutputStream
    extends java.io.OutputStream
    Bridge between the byte buffer and stream worlds.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.nio.channels.WritableByteChannel channel  
      private java.nio.ByteBuffer cypherOut  
      private java.nio.ByteBuffer plainOut  
      private javax.net.ssl.SSLEngine sslEngine  
    • Constructor Summary

      Constructors 
      Constructor Description
      SslEngineByteBufferOutputStream​(javax.net.ssl.SSLEngine sslEngine, java.nio.ByteBuffer plainOut, java.nio.ByteBuffer cypherOut, java.nio.channels.WritableByteChannel channel)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void doFlush()  
      void flush()  
      void write​(int b)  
      • Methods inherited from class java.io.OutputStream

        close, nullOutputStream, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • sslEngine

        private final javax.net.ssl.SSLEngine sslEngine
      • plainOut

        private final java.nio.ByteBuffer plainOut
      • cypherOut

        private final java.nio.ByteBuffer cypherOut
      • channel

        private final java.nio.channels.WritableByteChannel channel
    • Constructor Detail

      • SslEngineByteBufferOutputStream

        public SslEngineByteBufferOutputStream​(javax.net.ssl.SSLEngine sslEngine,
                                               java.nio.ByteBuffer plainOut,
                                               java.nio.ByteBuffer cypherOut,
                                               java.nio.channels.WritableByteChannel channel)
    • Method Detail

      • write

        public void write​(int b)
                   throws java.io.IOException
        Specified by:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Overrides:
        flush in class java.io.OutputStream
        Throws:
        java.io.IOException
      • doFlush

        private void doFlush()
                      throws java.io.IOException
        Throws:
        java.io.IOException