int currentRead = SSLUtils.doRead(key,workerThread.getInputBB(), workerThread.getSSLEngine(),readTimeout); if (currentRead > 0 || workerThread.getInputBB().position() > 0) { try{ byteBuffer = SSLUtils.unwrapAll(byteBuffer, workerThread.getInputBB(),workerThread.getSSLEngine()); workerThread.setByteBuffer(byteBuffer); if (currentRead == -1 &&
newBB.put(inputBB); inputBB = newBB; } else if (inputBB == null && workerThread.getInputBB() != null ){ inputBB = workerThread.getInputBB(); } else if (inputBB == null){ inputBB = ByteBuffer.allocate(inputBBSize);