code: public ByteBuffer getRemnant() throws IOException {
          if (!m_rxNetData.hasRemaining()) {
              return m_rxNetData.slice();
          }
          ByteBuffer remnant = ByteBuffer.allocate(m_eng.getSession().getApplicationBufferSize());
          SSLEngineResult result = m_eng.unwrap(m_rxNetData, remnant);
          switch (result.getStatus()) {
          case OK:
              assert !m_rxNetData.hasRemaining() : "there are unexpected additional remnants";
              return ((ByteBuffer)remnant.flip()).slice().asReadOnlyBuffer();
          case BUFFER_OVERFLOW:
              throw new IOException("buffer underflow while decrypting handshake remnant");
          case BUFFER_UNDERFLOW:
              throw new IOException("buffer overflow while decrypting handshake remnant");
          case CLOSED:
              throw new IOException("ssl engine closed while decrypting handshake remnant");
          }
          return null; // unreachable
      }
docs: The JDK caches SSL sessions when the participants are the same (i.e.
  multiple connection requests from the same peer). Once a session is cached
  the client side ends its handshake session quickly, and is able to send
  the login Volt message before the server finishes its handshake. This message
  is caught in the servers last handshake network read. This method returns the
  login message unencrypted
  
  @return potentially a byte buffer containing the client login message
  @throws IOException if the decryption operation fails