Package org.conscrypt

Class ConscryptEngineSocket.SSLInputStream

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

    private final class ConscryptEngineSocket.SSLInputStream
    extends java.io.InputStream
    Unwrap bytes read from the underlying socket.
    • Field Detail

      • readLock

        private final java.lang.Object readLock
      • singleByte

        private final byte[] singleByte
      • fromEngine

        private final java.nio.ByteBuffer fromEngine
      • fromSocket

        private final java.nio.ByteBuffer fromSocket
      • fromSocketArrayOffset

        private final int fromSocketArrayOffset
      • socketInputStream

        private java.io.InputStream socketInputStream
    • Constructor Detail

      • SSLInputStream

        SSLInputStream()
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException
      • release

        void release()
      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • available

        public int available()
                      throws java.io.IOException
        Overrides:
        available in class java.io.InputStream
        Throws:
        java.io.IOException
      • isHandshaking

        private boolean isHandshaking​(javax.net.ssl.SSLEngineResult.HandshakeStatus status)
      • readUntilDataAvailable

        private int readUntilDataAvailable​(byte[] b,
                                           int off,
                                           int len)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • processDataFromSocket

        private int processDataFromSocket​(byte[] b,
                                          int off,
                                          int len)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • isHandshakeFinished

        private boolean isHandshakeFinished()
      • renegotiate

        private void renegotiate()
                          throws java.io.IOException
        Processes a renegotiation received from the remote peer.
        Throws:
        java.io.IOException
      • init

        private void init()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • readFromSocket

        private int readFromSocket()
                            throws java.io.IOException
        Throws:
        java.io.IOException