Package org.conscrypt

Class ConscryptFileDescriptorSocket.SSLInputStream

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

    private class ConscryptFileDescriptorSocket.SSLInputStream
    extends java.io.InputStream
    This inner class provides input data stream functionality for the OpenSSL native implementation. It is used to read data received via SSL protocol.
    • Field Summary

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

      Constructors 
      Constructor Description
      SSLInputStream()  
    • Method Summary

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

        close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • readLock

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

      • SSLInputStream

        SSLInputStream()
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Reads one byte. If there is no data in the underlying buffer, this operation can block until the data will be available.
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

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

        public int available()
        Overrides:
        available in class java.io.InputStream
      • awaitPendingOps

        void awaitPendingOps()