code: @Override
      public Message deserializePayload(BitcoinPacketHeader header, ByteBuffer in) throws ProtocolException, BufferUnderflowException {
          byte[] payloadBytes = new byte[header.size];
          in.get(payloadBytes, 0, header.size);
  
          // Verify the checksum.
          byte[] hash;
          hash = Sha256Hash.hashTwice(payloadBytes);
          if (header.checksum[0] != hash[0] || header.checksum[1] != hash[1] ||
                  header.checksum[2] != hash[2] || header.checksum[3] != hash[3]) {
              throw new ProtocolException("Checksum failed to verify, actual " +
                      HEX.encode(hash) +
                      " vs " + HEX.encode(header.checksum));
          }
  
          if (log.isDebugEnabled()) {
              log.debug("Received {} byte '{}' message: {}", header.size, header.command,
                      HEX.encode(payloadBytes));
          }
  
          try {
              return makeMessage(header.command, header.size, payloadBytes, hash, header.checksum);
          } catch (Exception e) {
              throw new ProtocolException("Error deserializing message " + HEX.encode(payloadBytes) + "\n", e);
          }
      }
docs: Deserialize payload only.  You must provide a header, typically obtained by calling
  {@link BitcoinSerializer#deserializeHeader}.