Package com.github.stephenc.javaisotools.sabre

Examples of com.github.stephenc.javaisotools.sabre.Fixup.data()


        // 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


        long position = streamHandler.mark();
        int location = helper.getCurrentLocation();
        if (type == ISO9660Constants.TYPE_L_PT) {
            ptFixups = typeLPTFixups;
            Fixup ptLocationFixup = (Fixup) volumeFixups.get("typeLPTLocationFixup");
            ptLocationFixup.data(new LSBFWordDataReference(location));
            ptLocationFixup.close();
            volumeFixups.remove("typeLPTLocationFixup");
        } else if (type == ISO9660Constants.TYPE_M_PT) {
            ptFixups = typeMPTFixups;
            Fixup ptLocationFixup = (Fixup) volumeFixups.get("typeMPTLocationFixup");
View Full Code Here

            ptLocationFixup.close();
            volumeFixups.remove("typeLPTLocationFixup");
        } else if (type == ISO9660Constants.TYPE_M_PT) {
            ptFixups = typeMPTFixups;
            Fixup ptLocationFixup = (Fixup) volumeFixups.get("typeMPTLocationFixup");
            ptLocationFixup.data(new WordDataReference(location));
            ptLocationFixup.close();
            volumeFixups.remove("typeMPTLocationFixup");
        } else {
            throw new HandlerException("Unknown Path Table Type: " + type);
        }
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");
View Full Code Here

        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");
    }

    void doDir(ISO9660Directory dir, HashMap parentMapper) throws HandlerException {
View Full Code Here

        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) {
View Full Code Here

            fixups.length.close();
        }

        // Write and close Type L Path Table Fixup
        Fixup typeLPTDirLocation = (Fixup) typeLPTFixups.get(dir);
        typeLPTDirLocation.data(new LSBFWordDataReference(location));
        typeLPTDirLocation.close();

        // Write and close Type M Path Table Fixup
        Fixup typeMPTDirLocation = (Fixup) typeMPTFixups.get(dir);
        typeMPTDirLocation.data(new WordDataReference(location));
View Full Code Here

        typeLPTDirLocation.data(new LSBFWordDataReference(location));
        typeLPTDirLocation.close();

        // Write and close Type M Path Table Fixup
        Fixup typeMPTDirLocation = (Fixup) typeMPTFixups.get(dir);
        typeMPTDirLocation.data(new WordDataReference(location));
        typeMPTDirLocation.close();
    }

    private HashMap doDRLengthFixup(HashMap memory) throws HandlerException {
        int drLength = ((Integer) memory.get("drLength")).intValue();
View Full Code Here

            throw new HandlerException("Invalid Directory Record Length: " + drLength);
        }

        // Write and close Directory Record Length Fixup
        Fixup drLengthFixup = (Fixup) memory.get("drLengthFixup");
        drLengthFixup.data(new ByteDataReference(drLength));
        drLengthFixup.close();
        memory.remove("drLengthFixup");

        return memory;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.