@Override
        public int read() throws IOException {
            waitForHandshake();
            synchronized (readLock) {
                // Handle returning of -1 if EOF is reached.
                int count = read(singleByte, 0, 1);
                if (count == -1) {
                    // Handle EOF.
                    return -1;
                }
                if (count != 1) {
                    throw new SSLException("read incorrect number of bytes " + count);
                }
                return singleByte[0] & 0xff;
            }
        }
Unwrap bytes read from the underlying socket.
common/src/main/java/org/conscrypt/ConscryptEngineSocket.java