Package org.jnode.fs.iso9660

Examples of org.jnode.fs.iso9660.ISO9660File


      subdirB.addDirectory("Bzwei");
      subdirB.addDirectory("Beins");

      // Files with different versions
      // (to appear in descending order, pointing to same LSN)
      ISO9660File file1 = new ISO9660File("test/tux.gif", 1);
      root.addFile(file1);
      ISO9660File file10 = new ISO9660File("test/tux.gif", 10);
      root.addFile(file10);
      ISO9660File file12 = new ISO9660File("test/tux.gif", 12);
      root.addFile(file12);
    }

    // ISO9660 support
    ISO9660Config iso9660Config = new ISO9660Config();
View Full Code Here


            // Replace original file by patched one
            orgFile.delete();
            orgFile = new File(orgName);
            patchedFile.renameTo(orgFile);
            config.setBootImage(new ISO9660File(orgFile));

            System.out.println("Patched boot image at " + orgFile.getPath());
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
View Full Code Here

    public ElToritoConfig(File bootImage, int emulation, int platformID, String idString, int sectorCount,
                          int loadSegment) throws HandlerException, ConfigException {
        super("EL TORITO SPECIFICATION", "");
        this.bootable = true;
        this.loadSegment = loadSegment;
        this.bootImage = new ISO9660File(bootImage);
        setIDString(idString);
        this.systemType = 0;
        this.sectorCount = sectorCount;
        setPlatformID(platformID);
        setEmulation(emulation);
View Full Code Here

          }

          break;
        }
        case ArchiveEntry.FILE: {
          ISO9660File file;
          ISO9660Directory dir;

          /* Create the file */
          file = new ISO9660File(
              new ArchiveEntryDataReference(entry),
              getName(entry), entry.getResource()
                  .getLastModified());

          files.put(getPath(entry), file);
View Full Code Here

            id = (String) object;
            bytes = helper.pad(id, 128);
        } else if (object instanceof ISO9660File) {
            ByteBuffer buf = ByteBuffer.allocate(128);
            buf.put((byte) 0x5F);
            ISO9660File file = (ISO9660File) object;
            file.enforce8plus3(true);
            id = helper.getFilenameDataReference(file).getName();
            buf.put(helper.pad(id, 127));
            bytes = buf.array();
        } else {
            throw new HandlerException(
View Full Code Here

        // Root files (root itself does not have to be mapped)
        Iterator isoFit = isoRoot.getFiles().iterator();
        Iterator rripFit = rripRoot.getFiles().iterator();
        while (isoFit.hasNext()) {
            ISO9660File isoFile = (ISO9660File) isoFit.next();
            ISO9660File rripFile = (ISO9660File) rripFit.next();
            fileMapper.put(isoFile, rripFile);
        }

        // Subdirectories:
        // Since rripRoot and isoRoot are just a deep copy of the same
        // root at this point, simultaneous iteration can be applied here
        Iterator isoIt = isoRoot.unsortedIterator();
        Iterator rripIt = rripRoot.unsortedIterator();
        while (isoIt.hasNext()) {
            ISO9660Directory isoDir = (ISO9660Directory) isoIt.next();
            ISO9660Directory rripDir = (ISO9660Directory) rripIt.next();
            directoryMapper.put(isoDir.getID(), rripDir);

            isoFit = isoDir.getFiles().iterator();
            rripFit = rripDir.getFiles().iterator();
            while (isoFit.hasNext()) {
                ISO9660File isoFile = (ISO9660File) isoFit.next();
                ISO9660File rripFile = (ISO9660File) rripFit.next();
                fileMapper.put(isoFile.getID(), rripFile);
            }
        }
    }
View Full Code Here

        throw new RuntimeException("No matching directory found for " + dir.getISOPath());
    }

    public ISO9660File matchFile(ISO9660File file) {
        ISO9660File rripFile = (ISO9660File) fileMapper.get(file.getID());
        if (rripFile != null) {
            return rripFile;
        }

        throw new RuntimeException("No matching file found for " + file.getISOPath());
View Full Code Here

                    doDRLengthFixup(doFakeDR(subdir));
                } else {
                    doDRLengthFixup(doDR(subdir));
                }
            } else if (object instanceof ISO9660File) {
                ISO9660File file = (ISO9660File) object;
                doDRLengthFixup(doDR(file));
            } else {
                throw new HandlerException("Neither file nor directory: " + object);
            }
        }
View Full Code Here

        return memory;
    }

    HashMap doFakeDR(ISO9660Directory dir) throws HandlerException {
        ISO9660File file = new ISO9660File(dir.getName());
        file.setIsMovedDirectory();
        ISO9660DirectoryRecord dr = new ISO9660DirectoryRecord(streamHandler, file, helper);
        HashMap memory = dr.doDR();

        // Remember Location Fixup
        Fixup locationFixup = (Fixup) memory.get("drLocationFixup");
View Full Code Here

TOP

Related Classes of org.jnode.fs.iso9660.ISO9660File

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.