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

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


    private void writeImplementationUseVolumeDescriptor(RandomAccessFile myRandomAccessFile,
                                                        long volumeDescriptorSequenceNumber, long targetBlock,
                                                        int tagSerialNumber, byte[] udfVersionIdentifierSuffix,
                                                        int descriptorVersion)
            throws Exception {
        ImplementationUseVolumeDescriptor myImplementationUseVolumeDescriptor = new ImplementationUseVolumeDescriptor();

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

        myImplementationUseVolumeDescriptor.VolumeDescriptorSequenceNumber = volumeDescriptorSequenceNumber;
        myImplementationUseVolumeDescriptor.ImplementationIdentifier.setIdentifier("*UDF LV Info");
        myImplementationUseVolumeDescriptor.ImplementationIdentifier.IdentifierSuffix = udfVersionIdentifierSuffix;

        myImplementationUseVolumeDescriptor.ImplementationUse.ImplementationID.setIdentifier(applicationIdentifier);
        myImplementationUseVolumeDescriptor.ImplementationUse.ImplementationID.IdentifierSuffix =
                applicationIdentifierSuffix;

        myImplementationUseVolumeDescriptor.ImplementationUse.setLogicalVolumeIdentifier(imageIdentifier);
        // TODO: maybe set the LVInfo1 - 3 fields of ImplementationUse (f.ex. owner, organization, contact)

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


                catch (IOException myIOException) {
                }
            }
        }

        ImplementationUseVolumeDescriptor myImplementationUseVolumeDescriptor = new ImplementationUseVolumeDescriptor();

        myImplementationUseVolumeDescriptor.VolumeDescriptorSequenceNumber = volumeDescriptorSequenceNumber;
        myImplementationUseVolumeDescriptor.ImplementationIdentifier.IdentifierSuffix = udfVersionIdentifierSuffix;

        try {
            myImplementationUseVolumeDescriptor.ImplementationIdentifier.setIdentifier("*UDF LV Info");
            myImplementationUseVolumeDescriptor.ImplementationUse.ImplementationID.setIdentifier(applicationIdentifier);
            myImplementationUseVolumeDescriptor.ImplementationUse.setLogicalVolumeIdentifier(imageIdentifier);
        }
        catch (Exception myException) {
            throw new HandlerException(myException);
        }

        myImplementationUseVolumeDescriptor.ImplementationUse.ImplementationID.IdentifierSuffix =
                applicationIdentifierSuffix;

        // TODO: maybe set the LVInfo1 - 3 fields of ImplementationUse (f.ex. owner, organization, contact)

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

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

TOP

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

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.