Package com.github.stephenc.javaisotools.udflib.structures

Examples of com.github.stephenc.javaisotools.udflib.structures.AnchorVolumeDescriptorPointer


    private void writeAnchorVolumeDescriptorPointer(RandomAccessFile myRandomAccessFile, long targetBlock,
                                                    long MVDSBlock, long RVDSBlock, int tagSerialNumber,
                                                    int descriptorVersion)
            throws IOException {
        AnchorVolumeDescriptorPointer myAnchorVolumeDescriptorPointer = new AnchorVolumeDescriptorPointer();

        myAnchorVolumeDescriptorPointer.DescriptorTag.TagSerialNumber = tagSerialNumber;
        myAnchorVolumeDescriptorPointer.DescriptorTag.DescriptorVersion = descriptorVersion;
        myAnchorVolumeDescriptorPointer.DescriptorTag.TagLocation = targetBlock;

        myAnchorVolumeDescriptorPointer.MainVolumeDescriptorSequenceExtend.len = 16 * blockSize;
        myAnchorVolumeDescriptorPointer.MainVolumeDescriptorSequenceExtend.loc = MVDSBlock;

        myAnchorVolumeDescriptorPointer.ReserveVolumeDescriptorSequenceExtend.len = 16 * blockSize;
        myAnchorVolumeDescriptorPointer.ReserveVolumeDescriptorSequenceExtend.loc = RVDSBlock;

        myRandomAccessFile.seek(targetBlock * blockSize);
        myAnchorVolumeDescriptorPointer.write(myRandomAccessFile, blockSize);
    }
View Full Code Here


                catch (IOException myIOException) {
                }
            }
        }

        AnchorVolumeDescriptorPointer myAnchorVolumeDescriptorPointer = new AnchorVolumeDescriptorPointer();

        myAnchorVolumeDescriptorPointer.MainVolumeDescriptorSequenceExtend.len = 16 * blockSize;
        myAnchorVolumeDescriptorPointer.MainVolumeDescriptorSequenceExtend.loc = MVDSBlock;

        myAnchorVolumeDescriptorPointer.ReserveVolumeDescriptorSequenceExtend.len = 16 * blockSize;
        myAnchorVolumeDescriptorPointer.ReserveVolumeDescriptorSequenceExtend.loc = RVDSBlock;

        /*
          // full element with descriptor tag
          myAnchorVolumeDescriptorPointer.DescriptorTag.TagSerialNumber = tagSerialNumber;
          myAnchorVolumeDescriptorPointer.DescriptorTag.DescriptorVersion = descriptorVersion;
          myAnchorVolumeDescriptorPointer.DescriptorTag.TagLocation = tagLocation;
          super.data( new ByteArrayDataReference( myAnchorVolumeDescriptorPointer.getBytes( blockSize ) ) );
          */

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(2));                    // tag identifier
        super.data(new WordDataReference(tagLocation));            // tag location
        super.data(new WordDataReference(tagSerialNumber));        // tag serial number
        super.data(new WordDataReference(descriptorVersion));    // descriptor version
        super.data(new ByteArrayDataReference(myAnchorVolumeDescriptorPointer.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
View Full Code Here

TOP

Related Classes of com.github.stephenc.javaisotools.udflib.structures.AnchorVolumeDescriptorPointer

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.