Package com.github.stephenc.javaisotools.iso9660

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


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

    public void endDocument() throws HandlerException {
        if (padEnd) {
            // Pad to 150 sectors (like mkisofs -pad does)
            int pad = (int) (150 * ISO9660Constants.LOGICAL_SECTOR_SIZE -
                    bytesWritten % 16 * ISO9660Constants.LOGICAL_SECTOR_SIZE);
            super.data(new EmptyByteArrayDataReference(pad));
        }
        super.endDocument();
    }
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

        // Platform ID
        streamHandler.data(new ByteDataReference(platformID));

        // Number of section entries following this header
        streamHandler.data(new LSBFShortDataReference(sectionEntriesCount));

        // ID string identifying the section
        byte[] idStringData = pad(idString, 28);
        streamHandler.data(new ByteArrayDataReference(idStringData));
    }
View Full Code Here

        // Boot media type
        streamHandler.data(getExtendedBootMediaType(bootMediaType, entryExtFollows, containsATAPIDriver,
                containsSCSIDriver));

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

        // Selection criteria type
View Full Code Here

        Fixup locationFixup = streamHandler.fixup(location_dr);

        // Parent Directory Number
        DataReference parent_dn = null;
        if (type.equals(ISO9660Constants.TYPE_L_PT)) {
            parent_dn = new LSBFShortDataReference(parent);
        } else if (type.equals(ISO9660Constants.TYPE_M_PT)) {
            parent_dn = new ShortDataReference(parent);
        }
        streamHandler.data(parent_dn);
View Full Code Here

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

        // Remember Boot System Use (absolute pointer to first sector of Boot Catalog)
        bootCatalogLocation = fixup(new LSBFWordDataReference(0));

        super.endElement();
    }
View Full Code Here

TOP

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

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.