コード例 #1
0
  HashMap doDR(ISO9660File file) throws HandlerException {
    long position = streamHandler.mark();
    HashMap memory = super.doDR(file);

    if (RRIPFactory.MKISOFS_COMPATIBILITY) {
      // RR: Recorded Fields
      int flags =
          RRIPFactory.RR_PX_RECORDED | RRIPFactory.RR_TF_RECORDED | RRIPFactory.RR_NM_RECORDED;
      rripFactory.doRREntry(flags);
    }

    // PX: POSIX File Attributes
    POSIXFileMode fileMode = getPOSIXFileModeForObject(file);
    int fileModes = fileMode.getFileMode();
    rripFactory.doPXEntry(fileModes, 1, 0, 0, 1);

    // TF: Timestamp
    ISO9660ShortDateDataReference date = new ISO9660ShortDateDataReference(file.lastModified());
    rripFactory.doTFEntry(RRIPFactory.TF_MODIFY, date);

    // Compute length up to here
    int length = helper.getDifferenceTo(position);

    // NM: Alternate Name
    length = doNM(helper.getFilenameDataReference(file), length);

    // Update Directory Record Length
    return finalizeDR(memory, length);
  }