docs: public static int getRequiredSize(ByteBuffer source) {
  
          ByteBuffer input = source.duplicate();
  
          // Do we have a complete header?
          if (input.remaining() < RECORD_HEADER_SIZE) {
              throw new BufferUnderflowException();
          }
  
          // Is it a handshake message?
          byte firstByte = input.get();
          input.get();
          byte thirdByte = input.get();
          if ((firstByte & 0x80) != 0 && thirdByte == 0x01) {
              // looks like a V2ClientHello
              // return (((firstByte & 0x7F) << 8) | (secondByte & 0xFF)) + 2;
              return RECORD_HEADER_SIZE;   // Only need the header fields
          } else {
              return ((input.get() & 0xFF) << 8 | input.get() & 0xFF) + 5;
          }
      }