Package com.github.stephenc.javaisotools.iso9660.volumedescriptors

Examples of com.github.stephenc.javaisotools.iso9660.volumedescriptors.VolumeDescriptorSetTerminator


        // Interleave Gap Size: 0 (no interleaving)
        streamHandler.data(new ByteDataReference(0));
        length += 1;

        // Volume Sequence Number
        streamHandler.data(new BothShortDataReference(volSeqNo));
        length += 4;

        // Length of File Identifier
        streamHandler.data(new ByteDataReference(filenameDataReference.getLength()));
        length += 1;
View Full Code Here


    }

    public void endDocument() throws HandlerException {
        // 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

        // Unused Field: 8 bytes
        streamHandler.data(new EmptyByteArrayDataReference(8));

        // Volume Space Size
        Fixup vss = streamHandler.fixup(new BothWordDataReference(0));
        memory.put("volumeSpaceSizeFixup", vss);

        // Unused Field / Escape Sequences (SVD): 32 bytes
        Fixup es = streamHandler.fixup(new EmptyByteArrayDataReference(32));
        memory.put("escapeSequencesFixup", es);

        // Volume Set Size
        streamHandler.data(getVolumeSetSize());

        // Volume Sequence Number
        streamHandler.data(getVolumeSeqNo());

        // Logical Block Size
        streamHandler.data(getLogicalBlockSize());

        // Path Table Size
        Fixup pts = streamHandler.fixup(new BothWordDataReference(0));
        memory.put("ptSizeFixup", pts);

        // Type L Path Table Location
        Fixup tlpt = streamHandler.fixup(new LSBFWordDataReference(0));
        memory.put("typeLPTLocationFixup", tlpt);
View Full Code Here

        // Volume Partition Identifier: 32 bytes
        streamHandler.data(getVolumePartitionId());

        // Volume Partition Location
        Fixup location = streamHandler.fixup(new BothWordDataReference(0));
        memory.put("volumePartitionLocationFixup", location);

        // Volume Partition Size
        Fixup size = streamHandler.fixup(new BothWordDataReference(0));
        memory.put("volumePartitionSizeFixup", size);

        // System Use: handle externally

        return memory;
View Full Code Here

        Fixup extAttrRecordLengthFixup = streamHandler.fixup(new ByteDataReference(0));
        memory.put("drExtAttrRecordLengthFixup", extAttrRecordLengthFixup);
        length += 1;

        // Location of Extent
        Fixup locationFixup = streamHandler.fixup(new BothWordDataReference(0));
        memory.put("drLocationFixup", locationFixup);
        length += 8;

        // Data Length
        Fixup dataLengthFixup = streamHandler.fixup(new BothWordDataReference(0));
        memory.put("drDataLengthFixup", dataLengthFixup);
        length += 8;

        // Recording Date and Time
        Date now = new Date();
View Full Code Here

            volumeFixups.put("rripERLocationFixup", ceMemory.get("ceLocationFixup"));
            volumeFixups.put("rripERLengthFixup", ceMemory.get("ceLengthFixup"));

            // Write and close ER Offset Fixup
            Fixup rripEROffsetFixup = (Fixup) ceMemory.get("ceOffsetFixup");
            rripEROffsetFixup.data(new BothWordDataReference(0));
            rripEROffsetFixup.close();
        }

        // Update Directory Record Length
        return finalizeDR(memory, helper.getDifferenceTo(position));
View Full Code Here

            ISO9660Directory dir = (ISO9660Directory) it.next();

            // Write and close Location Fixup
            Fixup locationFixup = (Fixup) fixups.get(dir);
            int location = ((Integer) locations.get(dir)).intValue();
            locationFixup.data(new BothWordDataReference(location));
            locationFixup.close();
        }
    }
View Full Code Here

        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

        // Platform ID
        streamHandler.data(new ByteDataReference(platformID));
        sum += platformID << 8;

        // Reserved (2 bytes)
        streamHandler.data(new EmptyByteArrayDataReference(2));

        // ID string (24 bytes)
        byte[] idStringData = pad(idString, 24);
        streamHandler.data(new ByteArrayDataReference(idStringData));
        sum += stringWordSum(idStringData);
View Full Code Here

TOP

Related Classes of com.github.stephenc.javaisotools.iso9660.volumedescriptors.VolumeDescriptorSetTerminator

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.