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

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


        streamHandler.startElement(new LogicalSectorElement("CA"));
        int location = helper.getCurrentLocation();

        // Write and close RRIP ER Location Fixup
        Fixup rripERLocationFixup = (Fixup) volumeFixups.get("rripERLocationFixup");
        rripERLocationFixup.data(new BothWordDataReference(location));
        rripERLocationFixup.close();

        // Write ER Entry
        rripFactory.doEREntry();

        // Write ST Entry and compute length
        int erLength = doST(helper.getDifferenceTo(position));

        // Write and close RRIP ER Length Fixup
        Fixup rripERLengthFixup = (Fixup) volumeFixups.get("rripERLengthFixup");
        rripERLengthFixup.data(new BothWordDataReference(erLength));
        rripERLengthFixup.close();

        // Process unfinished NM Entries
        int offset = erLength;
        Iterator it = unfinishedNMEntries.iterator();
        while (it.hasNext()) {
            UnfinishedNMEntry unfinishedNMEntry = (UnfinishedNMEntry) it.next();
            String name = unfinishedNMEntry.filenameRest;
            rripFactory.doNMEntry(0, helper.getFilenameDataReference(name));

            // Write and close CE Entry Location Fixup
            unfinishedNMEntry.location.data(new BothWordDataReference(location));
            unfinishedNMEntry.location.close();

            // Write and close CE Entry Offset Fixup
            unfinishedNMEntry.offset.data(new BothWordDataReference(offset));
            unfinishedNMEntry.offset.close();

            // Write ST Entry and compute length
            int ceLength = doST(name.length() + RRIPFactory.NM_ENTRY_LENGTH);

            // Write and close CE Entry Length Fixup
            unfinishedNMEntry.length.data(new BothWordDataReference(ceLength));
            unfinishedNMEntry.length.close();

            offset += ceLength;
        }
View Full Code Here


        // Write and close Empty File Fixups
        factory.doEmptyFileFixups();

        // Write and close Volume Space Size Fixup
        Fixup volumeSpaceSizeFixup = (Fixup) volumeFixups.get("volumeSpaceSizeFixup");
        volumeSpaceSizeFixup.data(new BothWordDataReference(helper.getCurrentLocation()));
        volumeSpaceSizeFixup.close();
        volumeFixups.remove("volumeSpaceSizeFixup");

        super.endDocument();
    }
View Full Code Here

    public HashMap doCEEntry() throws HandlerException {
        HashMap memory = new HashMap();
        streamHandler.startElement(new SystemUseEntryElement("CE", 1));

        Fixup ceLocationFixup = streamHandler.fixup(new BothWordDataReference(0));
        memory.put("ceLocationFixup", ceLocationFixup);

        Fixup ceOffsetFixup = streamHandler.fixup(new BothWordDataReference(0));
        memory.put("ceOffsetFixup", ceOffsetFixup);

        Fixup ceLengthFixup = streamHandler.fixup(new BothWordDataReference(0));
        memory.put("ceLengthFixup", ceLengthFixup);

        streamHandler.endElement();
        return memory;
    }
View Full Code Here

        }

        if (volumeFixups.containsKey("ptSizeFixup")) {
            int ptSize = helper.getDifferenceTo(position);
            Fixup ptSizeFixup = (Fixup) volumeFixups.get("ptSizeFixup");
            ptSizeFixup.data(new BothWordDataReference(ptSize));
            ptSizeFixup.close();
            volumeFixups.remove("ptSizeFixup");
        }

        streamHandler.endElement();
View Full Code Here

    private void doRootDirFixups(HashMap parentMapper) throws HandlerException {
        ParentInfo parentInfo = (ParentInfo) parentMapper.get(root);

        // Write and close Root Directory Location Fixup
        Fixup rootDirLocationFixup = (Fixup) volumeFixups.get("rootDirLocationFixup");
        rootDirLocationFixup.data(new BothWordDataReference(parentInfo.location));
        rootDirLocationFixup.close();
        volumeFixups.remove("rootDirLocationFixup");

        // Write and close Root Directory Length Fixup
        Fixup rootDirLengthFixup = (Fixup) volumeFixups.get("rootDirLengthFixup");
        rootDirLengthFixup.data(new BothWordDataReference(parentInfo.length));
        rootDirLengthFixup.close();
        volumeFixups.remove("rootDirLengthFixup");
    }
View Full Code Here

        dotInfo.location = location;
        dotInfo.length = length;
        parentMapper.put(dir, dotInfo);

        // Write and close "dot" Fixups
        dotLocationFixup.data(new BothWordDataReference(location));
        dotLocationFixup.close();
        dotLengthFixup.data(new BothWordDataReference(length));
        dotLengthFixup.close();

        // Retrieve Parent Location and Length from parentMapper
        ParentInfo dotdotInfo = (ParentInfo) parentMapper.get(dir.getParentDirectory());

        // Write and close "dotdot" Fixups
        dotdotLocationFixup.data(new BothWordDataReference(dotdotInfo.location));
        dotdotLocationFixup.close();
        dotdotLengthFixup.data(new BothWordDataReference(dotdotInfo.length));
        dotdotLengthFixup.close();

        // Write and close Fixups of linking Directory Records
        DirFixupPair fixups = (DirFixupPair) dirFixups.get(dir);
        if (fixups != null) {
            // Write and close Location Fixup
            fixups.location.data(new BothWordDataReference(location));
            fixups.location.close();

            // Write and close Length Fixup
            fixups.length.data(new BothWordDataReference(length));
            fixups.length.close();
        }

        // Write and close Type L Path Table Fixup
        Fixup typeLPTDirLocation = (Fixup) typeLPTFixups.get(dir);
View Full Code Here

        Fixup locationFixup = (Fixup) memory.get("drLocationFixup");
        emptyFileFixups.add(locationFixup);

        // Write and close Length Fixup
        Fixup dataLengthFixup = (Fixup) memory.get("drDataLengthFixup");
        dataLengthFixup.data(new BothWordDataReference(0));
        dataLengthFixup.close();

        return memory;
    }
View Full Code Here

        }
        fileFixups.put(file.getID(), locationFixup);

        // Write and close Length Fixup
        Fixup dataLengthFixup = (Fixup) memory.get("drDataLengthFixup");
        dataLengthFixup.data(new BothWordDataReference(file.length()));
        dataLengthFixup.close();

        return memory;
    }
View Full Code Here

        } else {
            locationFixups.put(file.getContentID(), new Integer(location));
        }

        // Write and close File Fixup
        locationFixup.data(new BothWordDataReference(location));
        locationFixup.close();
    }
View Full Code Here

            streamHandler.startElement(new LogicalSectorElement("DUMMY"));

            // Write and close Empty File Fixup
            int location = helper.getCurrentLocation();
            Fixup locationFixup = (Fixup) it.next();
            locationFixup.data(new BothWordDataReference(location));
            locationFixup.close();

            streamHandler.endElement();
        }
    }
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.