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

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


    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


        return memory;
    }

    public void doPDEntry(int paddingLength) throws HandlerException {
        streamHandler.startElement(new SystemUseEntryElement("PD", 1));
        streamHandler.data(new EmptyByteArrayDataReference(paddingLength));
        streamHandler.endElement();
    }
View Full Code Here

        streamHandler.data(source);
        streamHandler.endElement();
    }

    public void doEREntry(DataReference id, DataReference source, int version) throws HandlerException {
        doEREntry(id, new EmptyByteArrayDataReference(0), source, version);
    }
View Full Code Here

        int length = (int) ((streamHandler.mark() - position) % ISO9660Constants.LOGICAL_BLOCK_SIZE);
        int rest = ISO9660Constants.LOGICAL_BLOCK_SIZE - length;
        if (rest < 0xFF) {
            // Maybe not enough space to store another DR in this block
            // -> pad to end of block (see ISO9660:7.8.1.1)
            streamHandler.data(new EmptyByteArrayDataReference(rest));
        }
    }
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.sabre.impl.EmptyByteArrayDataReference

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.