int getPendingReadableBytes() {
        lock.readLock().lock();
        try {
            if (!isClosed()) {
                return NativeCrypto.SSL_pending_readable_bytes(ssl, this);
            }
            return 0;
        } finally {
            lock.readLock().unlock();
        }
    }
A utility wrapper that abstracts operations on the underlying native SSL instance.
common/src/main/java/org/conscrypt/NativeSsl.java