Package com.github.stephenc.javaisotools.iso9660.sabre.impl

Examples of com.github.stephenc.javaisotools.iso9660.sabre.impl.BothWordDataReference


        IOUtil.copy(contentString, os);
        IOUtil.close(os);

        // Directory hierarchy, starting from the root
        ISO9660RootDirectory.MOVED_DIRECTORIES_STORE_NAME = "rr_moved";
        ISO9660RootDirectory root = new ISO9660RootDirectory();

        root.addFile(contents);

        StreamHandler streamHandler = new ISOImageFileHandler(outfile);
        CreateISO iso = new CreateISO(streamHandler, root);
        ISO9660Config iso9660Config = new ISO9660Config();
        iso9660Config.allowASCII(false);
View Full Code Here


        IOUtil.copy("Goodbye", os);
        IOUtil.close(os);

        // Directory hierarchy, starting from the root
        ISO9660RootDirectory.MOVED_DIRECTORIES_STORE_NAME = "rr_moved";
        ISO9660RootDirectory root = new ISO9660RootDirectory();

        ISO9660Directory dir = root.addDirectory("root");
        dir.addFile(contentsA);
        dir.addFile(contentsB);

        StreamHandler streamHandler = new ISOImageFileHandler(outfile);
        CreateISO iso = new CreateISO(streamHandler, root);
View Full Code Here

        File rootDir = new File(workDir, "big");
        assertThat(rootDir.isDirectory() || rootDir.mkdirs(), is(true));

        // Directory hierarchy, starting from the root
        ISO9660RootDirectory.MOVED_DIRECTORIES_STORE_NAME = "rr_moved";
        ISO9660RootDirectory root = new ISO9660RootDirectory();
        for (int i = 0; i < numFiles; i++) {
            File content = new File(rootDir, Integer.toString(i) + ".bin");
            int length = entropy.nextInt(1024 * 10 + 1);
            byte[] contents = new byte[length];
            entropy.nextBytes(contents);
            FileOutputStream fos = null;
            try {
                fos = new FileOutputStream(content);
                 fos.write(contents);
            } finally {
                IOUtil.close(fos);
            }
            root.addFile(content);
        }

        StreamHandler streamHandler = new ISOImageFileHandler(outfile);
        CreateISO iso = new CreateISO(streamHandler, root);
        ISO9660Config iso9660Config = new ISO9660Config();
View Full Code Here

        os = new FileOutputStream(contentsB);
        IOUtil.copy("Goodbye", os);
        IOUtil.close(os);

        // Top down
        ISO9660RootDirectory root = new ISO9660RootDirectory();
        ISO9660Directory n1 = root.addDirectory("D1");
        ISO9660Directory n2 = n1.addDirectory("D2");
        ISO9660Directory n3 = n2.addDirectory("D3");
        n3.addFile(contentsA);
        n3.addFile(contentsB);
View Full Code Here

        while (it.hasNext()) {
            FileSet fs = (FileSet) it.next();

            String prefix = "";
            if (fs instanceof ISOFileSet) {
                ISOFileSet ifs = (ISOFileSet) fs;
                prefix = ifs.getPrefix();
            }

            createHierarchy(root, fs, prefix);
        }
    }
View Full Code Here

    }

    private void doBVD() throws HandlerException {
        super.startElement(new LogicalSectorElement("BR"));

        LayoutHelper helper = new ElToritoLayoutHelper(this);
        BootRecord br = new BootRecord(this, helper);
        br.setMetadata(config);
        br.doBR();

        // Remember Boot System Use (absolute pointer to first sector of Boot Catalog)
View Full Code Here

    }

    public void applyNamingConventions() throws HandlerException {
        super.applyNamingConventions();

        NamingConventions namingConventions = helper.getNamingConventions();
        namingConventions.processDirectory(rripRoot);

        Iterator sit = rripRoot.unsortedIterator();
        while (sit.hasNext()) {
            ISO9660Directory dir = (ISO9660Directory) sit.next();
            namingConventions.processDirectory(dir);
        }
    }
View Full Code Here

        ElToritoConfig.LOAD_SEGMENT_7C0);
    }

    // Create ISO
    StreamHandler streamHandler = new ISOImageFileHandler(outfile);
    CreateISO iso = new CreateISO(streamHandler, root);
    iso.process(iso9660Config, rrConfig, jolietConfig, elToritoConfig);
    System.out.println("Done. File is: " + outfile);
  }
View Full Code Here

                        getBootPlatformID(), bootImageID, bootImageSectorCount,
                        bootImageLoadSegment);
                elToritoConfig.setGenBootInfoTable(genBootInfoTable);
            }

            CreateISO iso = new CreateISO(new ISOImageFileHandler(destFile), root);
            iso.process(iso9660Config, rrConfig, jolietConfig, elToritoConfig);
            log("Successfully created ISO image " + destFile + ".");
        } catch (ConfigException ce) {
            throw new BuildException(ce);
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        parent.addFile(e.getValue());
      }

      StreamHandler streamHandler = new ISOImageFileHandler(new File(
          dest.getParentFile(), dest.getName()));
      CreateISO iso = new CreateISO(streamHandler, root);
      ISO9660Config iso9660Config = new ISO9660Config();
      iso9660Config.allowASCII(false);
      iso9660Config.setInterchangeLevel(1);
      iso9660Config.restrictDirDepthTo8(true);
      iso9660Config.forceDotDelimiter(true);
      applyConfig(iso9660Config);
      RockRidgeConfig rrConfig = new RockRidgeConfig();
      rrConfig.setMkisofsCompatibility(false);
      rrConfig.hideMovedDirectoriesStore(true);
      rrConfig.forcePortableFilenameCharacterSet(true);

      JolietConfig jolietConfig = new JolietConfig();
      jolietConfig.forceDotDelimiter(true);
      applyConfig(jolietConfig);

      iso.process(iso9660Config, rrConfig, jolietConfig, null);
    } catch (HandlerException e) {
      throw new ArchiverException(e.getMessage(), e);
    } catch (FileNotFoundException e) {
      throw new ArchiverException(e.getMessage(), e);
    } catch (ConfigException e) {
View Full Code Here

TOP

Related Classes of com.github.stephenc.javaisotools.iso9660.sabre.impl.BothWordDataReference

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.