code: static Xdr removeRecordMarking(byte[] bytes) {
          Xdr toReturn = new Xdr(bytes.length);
          Xdr input = new Xdr(bytes);
  
          long fragSize;
          boolean lastFragment = false;
  
          input.setOffset(0);
          int inputOff = input.getOffset();
  
          while (!lastFragment) {
  
              fragSize = input.getUnsignedInt();
              lastFragment = isLastFragment(fragSize);
              fragSize = maskFragmentSize(fragSize);
  
              toReturn.putBytes(input.getBuffer(), input.getOffset(), (int) fragSize);
              inputOff += fragSize;
              input.setOffset(inputOff);
          }
  
          // get xid
          int off = toReturn.getOffset();
          toReturn.setOffset(0);
          int xid = toReturn.getInt();
          toReturn.setXid(xid);
          toReturn.setOffset(off);
  
          return toReturn;
      }
docs: Remove record marking from the byte array and convert to an Xdr.
  
  @param bytes The byte array.
  @return The Xdr.