Package com.github.stephenc.javaisotools.iso9660

Examples of com.github.stephenc.javaisotools.iso9660.ISO9660Directory


        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

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

        // Load RBA
        Fixup loadRBA = streamHandler.fixup(new LSBFWordDataReference(0));

        // Unused (19 bytes)
        streamHandler.data(new EmptyByteArrayDataReference(19));

        return loadRBA;
    }
View Full Code Here

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

        // 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());
View Full Code Here

        Object element = elements.pop();
        if (element instanceof LogicalSectorElement) {
            // Pad to one logical block
            int pad =
                    (int) (ISO9660Constants.LOGICAL_SECTOR_SIZE - bytesWritten % ISO9660Constants.LOGICAL_SECTOR_SIZE);
            super.data(new EmptyByteArrayDataReference(pad));
        } else if (isSAElement(element)) {
            // Pad to 16 sectors
            int pad = (int) (16 * ISO9660Constants.LOGICAL_SECTOR_SIZE -
                    bytesWritten % 16 * ISO9660Constants.LOGICAL_SECTOR_SIZE);
            super.data(new EmptyByteArrayDataReference(pad));
        }
        super.endElement();
    }
View Full Code Here

        sum += stringWordSum(idStringData);

        // Checksum word
        sum += 0xAA55; // Key bytes
        int checksum = 0x10000 - sum;
        streamHandler.data(new LSBFShortDataReference(checksum));

        // Key byte (0x55)
        streamHandler.data(new ByteDataReference(0x55));

        // Key byte (0xAA)
View Full Code Here

        // Boot media type
        streamHandler.data(getBootMediaType(bootMediaType));

        // Load Segment: (0: use traditional segment of 0x7C0)
        streamHandler.data(new LSBFShortDataReference(loadSegment));

        // System Type
        streamHandler.data(new ByteDataReference(systemType));

        // Unused byte
        streamHandler.data(new ByteDataReference(0));

        // Sector Count
        streamHandler.data(new LSBFShortDataReference(sectorCount));

        // Load RBA
        Fixup loadRBA = streamHandler.fixup(new LSBFWordDataReference(0));

        // Unused (19 bytes)
View Full Code Here

TOP

Related Classes of com.github.stephenc.javaisotools.iso9660.ISO9660Directory

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.