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

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


    }

    private void writeTerminatingDescriptor(RandomAccessFile myRandomAccessFile, long targetBlock, int tagSerialNumber,
                                            int descriptorVersion)
            throws IOException {
        TerminatingDescriptor myTerminatingDescriptor = new TerminatingDescriptor();

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

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


                catch (IOException myIOException) {
                }
            }
        }

        TerminatingDescriptor myTerminatingDescriptor = new TerminatingDescriptor();

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

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(8));                    // 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(myTerminatingDescriptor.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
View Full Code Here

TOP

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

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.