docs: @Override
      protected final void extendedSave(FileOutputStream fos, Set<RegData> hashes) {
          Writer pw = new BufferedWriter(createWriter(fos));
          try {
              // Print magic sequence (print separate to avoid new Strings).
              pw.write(mMode.getMagicSequence());
              pw.write('\n');
              State state = newState();
              // Sort is not necessary, but good for debugging; we assume that set
              // is sorted.
              // Print hashes (we print each separate to avoid new Strings).
              for (RegData regDatum : hashes) {
                  printLine(state, pw, regDatum.getURLExternalForm(), regDatum.getHash());
              }
          } catch (IOException ex) {
              Log.e("Problems while saving dependencies");
          } finally {
              FileUtil.closeAndIgnoreExceptions(pw);
          }
      }