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

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


                                                       Calendar recordingTimeCalendar, int tagSerialNumber,
                                                       int minimumUDFReadRevision, int minimumUDFWriteRevision,
                                                       int maximumUDFWriteRevision, int descriptorVersion,
                                                       long[] sizeTable, long[] freeSpaceTable)
            throws Exception {
        LogicalVolumeIntegrityDescriptor myLogicalVolumeIntegrityDescriptor = new LogicalVolumeIntegrityDescriptor();

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

        myLogicalVolumeIntegrityDescriptor.RecordingDateAndTime.set(recordingTimeCalendar);
        myLogicalVolumeIntegrityDescriptor.IntegrityType = 1;
        myLogicalVolumeIntegrityDescriptor.NumberOfPartitions = sizeTable.length;

        myLogicalVolumeIntegrityDescriptor.FreeSpaceTable = freeSpaceTable;
        myLogicalVolumeIntegrityDescriptor.SizeTable = sizeTable;

        myLogicalVolumeIntegrityDescriptor.LogicalVolumeContensUse.UniqueID = myUniqueIdDisposer.getNextUniqueId();

        myLogicalVolumeIntegrityDescriptor.LengthOfImplementationUse = 46;

        EntityID implementationId = new EntityID();
        implementationId.setIdentifier(applicationIdentifier);
        implementationId.IdentifierSuffix = applicationIdentifierSuffix;

        long numberOfFiles = rootUDFImageBuilderFile.getFileCount();
        long numberOfDirectories = rootUDFImageBuilderFile.getDirectoryCount();

        myLogicalVolumeIntegrityDescriptor
                .setImplementationUse(implementationId, numberOfFiles, numberOfDirectories, minimumUDFReadRevision,
                        minimumUDFWriteRevision, maximumUDFWriteRevision);

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


                catch (IOException myIOException) {
                }
            }
        }

        LogicalVolumeIntegrityDescriptor myLogicalVolumeIntegrityDescriptor = new LogicalVolumeIntegrityDescriptor();

        myLogicalVolumeIntegrityDescriptor.RecordingDateAndTime.set(recordingTimeCalendar);
        myLogicalVolumeIntegrityDescriptor.IntegrityType = 1;
        myLogicalVolumeIntegrityDescriptor.NumberOfPartitions = sizeTable.length;

        myLogicalVolumeIntegrityDescriptor.FreeSpaceTable = freespaceTable;
        myLogicalVolumeIntegrityDescriptor.SizeTable = sizeTable;

        myLogicalVolumeIntegrityDescriptor.LogicalVolumeContensUse.UniqueID = nextUniqueId;

        myLogicalVolumeIntegrityDescriptor.LengthOfImplementationUse = 46;

        EntityID implementationId = new EntityID();

        try {
            implementationId.setIdentifier(applicationIdentifier);
            implementationId.IdentifierSuffix = applicationIdentifierSuffix;
        }
        catch (Exception myException) {
            throw new HandlerException(myException);
        }

        myLogicalVolumeIntegrityDescriptor
                .setImplementationUse(implementationId, numberOfFiles, numberOfDirectories, minimumUDFReadRevision,
                        minimumUDFWriteRevision, maximumUDFWriteRevision);

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

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

TOP

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

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.