code: private long fileAligned(long value) {
          long fileAlign = optHeader.getAdjustedFileAlignment();
          long rest = value % fileAlign;
          long result = value;
          if (rest != 0) {
              result = value - rest + fileAlign;
          }
          if (!(optHeader.isLowAlignmentMode() || result % 512 == 0)) {
              logger.error("file aligning went wrong");
              logger.error("rest: " + rest);
              logger.error("value: " + value);
              logger.error("filealign: " + fileAlign);
              logger.error("filealign % 512: " + (fileAlign % 512));
              logger.error("result % 512: " + (result % 512));
              logger.error("result: " + result);
          }
          assert optHeader.isLowAlignmentMode() || result % 512 == 0;
          assert result >= value;
          return result;
      }
docs: Rounds up the value to the file alignment of the optional header.
  
  @param value
  @return file aligned value