Package org.conscrypt

Class ConscryptFileDescriptorSocket.SSLOutputStream

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

    private class ConscryptFileDescriptorSocket.SSLOutputStream
    extends java.io.OutputStream
    This inner class provides output data stream functionality for the OpenSSL native implementation. It is used to write data according to the encryption parameters given in SSL context.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object writeLock
      OpenSSL only lets one thread write at a time, so this is used to make sure we serialize callers of SSL_write.
    • Constructor Summary

      Constructors 
      Constructor Description
      SSLOutputStream()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void awaitPendingOps()  
      void write​(byte[] buf, int offset, int byteCount)
      Method acts as described in spec for superclass.
      void write​(int oneByte)
      Method acts as described in spec for superclass.
      • Methods inherited from class java.io.OutputStream

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

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

      • writeLock

        private final java.lang.Object writeLock
        OpenSSL only lets one thread write at a time, so this is used to make sure we serialize callers of SSL_write. Thread is already expected to have completed handshaking.
    • Constructor Detail

      • SSLOutputStream

        SSLOutputStream()
    • Method Detail

      • write

        public void write​(int oneByte)
                   throws java.io.IOException
        Method acts as described in spec for superclass.
        Specified by:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
        See Also:
        OutputStream.write(int)
      • write

        public void write​(byte[] buf,
                          int offset,
                          int byteCount)
                   throws java.io.IOException
        Method acts as described in spec for superclass.
        Overrides:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
        See Also:
        OutputStream.write(byte[],int,int)
      • awaitPendingOps

        void awaitPendingOps()