catch (IOException myIOException) {
}
}
}
LogicalVolumeDescriptor myLogicalVolumeDescriptor = new LogicalVolumeDescriptor();
try {
myLogicalVolumeDescriptor.VolumeDescriptorSequenceNumber = volumeDescriptorSequenceNumber;
myLogicalVolumeDescriptor.setLogicalVolumeIdentifier(imageIdentifier);
myLogicalVolumeDescriptor.LogicalBlockSize = blockSize;
myLogicalVolumeDescriptor.DomainIdentifier.setIdentifier("*OSTA UDF Compliant");
myLogicalVolumeDescriptor.DomainIdentifier.IdentifierSuffix = udfVersionIdentifierSuffix;
myLogicalVolumeDescriptor.LogicalVolumeContentsUse.ExtentLength = blockSize;
myLogicalVolumeDescriptor.LogicalVolumeContentsUse.ExtentLocation.part_num = fileSetDescriptorPartition;
myLogicalVolumeDescriptor.LogicalVolumeContentsUse.ExtentLocation.lb_num = fileSetDescriptorLocation;
myLogicalVolumeDescriptor.ImplementationIdentifier.setIdentifier(applicationIdentifier);
myLogicalVolumeDescriptor.ImplementationIdentifier.IdentifierSuffix = applicationIdentifierSuffix;
// partition map type 1, length 6, volume sequence number 0, partition number 0
PartitionMapType1 myPartitionMapType1 = new PartitionMapType1();
byte myPartitionMapType1Bytes[] = myPartitionMapType1.getBytes();
if (mainMetadataFileLocation > 0) {
PartitionMapType2 myPartitionMapType2 = new PartitionMapType2();
EntityID partitionTypeIdentifier = new EntityID();
partitionTypeIdentifier.setIdentifier("*UDF Metadata Partition");
partitionTypeIdentifier.IdentifierSuffix = udfVersionIdentifierSuffix;
myPartitionMapType2.setupMetadataPartitionMap(partitionTypeIdentifier, 1, 0, mainMetadataFileLocation,
mirrorMetadataFileLocation, 0xFFFFFFFF, metadataAllocationUnitSize, metadataAlignmentUnitSize,
(byte) 0);
byte myPartitionMapType2Bytes[] = myPartitionMapType2.getBytes();
myLogicalVolumeDescriptor.NumberofPartitionMaps = 2;
myLogicalVolumeDescriptor.PartitionMaps =
new byte[myPartitionMapType1Bytes.length + myPartitionMapType2Bytes.length];
System.arraycopy(myPartitionMapType1Bytes, 0, myLogicalVolumeDescriptor.PartitionMaps, 0,
myPartitionMapType1Bytes.length);
System.arraycopy(myPartitionMapType2Bytes, 0, myLogicalVolumeDescriptor.PartitionMaps, 6,
myPartitionMapType2Bytes.length);
} else {
myLogicalVolumeDescriptor.NumberofPartitionMaps = 1;
myLogicalVolumeDescriptor.PartitionMaps = myPartitionMapType1Bytes;
}
}
catch (Exception myException) {
throw new HandlerException(myException);
}
myLogicalVolumeDescriptor.MapTableLength = myLogicalVolumeDescriptor.PartitionMaps.length;
myLogicalVolumeDescriptor.IntegritySequenceExtent.loc = logicalVolumeIntegritySequenceStartingBlock;
myLogicalVolumeDescriptor.IntegritySequenceExtent.len =
(logicalVolumeIntegritySequenceEndingBlock - logicalVolumeIntegritySequenceStartingBlock) * blockSize;
/*
// full element with descriptor tag
myLogicalVolumeDescriptor.DescriptorTag.TagSerialNumber = tagSerialNumber;
myLogicalVolumeDescriptor.DescriptorTag.DescriptorVersion = descriptorVersion;
myLogicalVolumeDescriptor.DescriptorTag.TagLocation = tagLocation;
super.data( new ByteArrayDataReference( myLogicalVolumeDescriptor.getBytes( blockSize ) ) );
*/
// without descriptor tag (handled in next pipeline section)
super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
super.data(new WordDataReference(6)); // 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(myLogicalVolumeDescriptor.getBytesWithoutDescriptorTag()));
super.endElement();
}