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

Examples of com.github.stephenc.javaisotools.sabre.impl.ByteDataReference


            // Signature Word
            data(new ByteArrayDataReference(sue.getSignatureWord()));

            // Length (including Signature Word, Length, Version and Data)
            lengthFixup = fixup(new ByteDataReference(0));

            // Version
            data(new ByteDataReference(sue.getVersion()));
        }

        super.startElement(element);
    }
View Full Code Here


        if (element instanceof SystemUseEntryElement) {
            // Write and close Entry Length Fixup
            if (length > 255) {
                throw new RuntimeException("Invalid System Use Entry length: " + length);
            }
            lengthFixup.data(new ByteDataReference(length));
            lengthFixup.close();
        }
        super.endElement();
    }
View Full Code Here

        streamHandler.endElement();
    }

    public void doSPEntry(int skipBytes) throws HandlerException {
        streamHandler.startElement(new SystemUseEntryElement("SP", 1));
        streamHandler.data(new ByteDataReference(0xBE));
        streamHandler.data(new ByteDataReference(0xEF));
        streamHandler.data(new ByteDataReference(skipBytes));
        streamHandler.endElement();
    }
View Full Code Here

    }

    public void doEREntry(DataReference id, DataReference descriptor, DataReference source, int version)
            throws HandlerException {
        streamHandler.startElement(new SystemUseEntryElement("ER", 1));
        streamHandler.data(new ByteDataReference(id.getLength()));
        streamHandler.data(new ByteDataReference(descriptor.getLength()));
        streamHandler.data(new ByteDataReference(source.getLength()));
        streamHandler.data(new ByteDataReference(version));
        streamHandler.data(id);
        if (descriptor.getLength() > 0) {
            streamHandler.data(descriptor);
        }
        streamHandler.data(source);
View Full Code Here

        doEREntry(id, new EmptyByteArrayDataReference(0), source, version);
    }

    public void doESEntry(int sequenceNumber) throws HandlerException {
        streamHandler.startElement(new SystemUseEntryElement("ES", 1));
        streamHandler.data(new ByteDataReference(sequenceNumber));
        streamHandler.endElement();
    }
View Full Code Here

        int drLength = ((Integer) memory.get("drLength")).intValue();
        memory.remove("drLength");

        if (drLength % 2 == 1) {
            // DR length must be an even number, see ISO 9660 section 9.1.13
            streamHandler.data(new ByteDataReference(0));
            drLength++;
        }

        if (drLength > 0xFF) {
            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

        streamHandler.endElement();
    }

    public void startSLEntry(boolean continues) throws HandlerException {
        streamHandler.startElement(new SystemUseEntryElement("SL", 1));
        streamHandler.data(new ByteDataReference(continues ? 1 : 0));
    }
View Full Code Here

    public void doComponentRecord(int flags) throws HandlerException {
        if (flags != CR_CONTINUES && flags != CR_CURRENT && flags != CR_PARENT && flags != CR_ROOT) {
            throw new HandlerException("Invalid Rock Ridge Component Record flags combination: " + flags);
        }
        streamHandler.data(new ByteDataReference(flags));
        streamHandler.data(new ByteDataReference(0));
    }
View Full Code Here

        streamHandler.data(new ByteDataReference(flags));
        streamHandler.data(new ByteDataReference(0));
    }

    public void doComponentRecord(DataReference name) throws HandlerException {
        streamHandler.data(new ByteDataReference(0));
        streamHandler.data(new ByteDataReference(name.getLength()));
        streamHandler.data(name);
    }
View Full Code Here

        streamHandler.startElement(new SystemUseEntryElement("NM", 1));

        if (flags != 0 && flags != NM_CONTINUES && flags != NM_CURRENT && flags != NM_PARENT) {
            throw new HandlerException("Invalid Rock Ridge directory flags combination: " + flags);
        }
        streamHandler.data(new ByteDataReference(flags));

        streamHandler.data(name);
        streamHandler.endElement();
    }
View Full Code Here

TOP

Related Classes of com.github.stephenc.javaisotools.sabre.impl.ByteDataReference

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.