// partition map type 1, length 6, volume sequence number 0, partition number 0
PartitionMapType1 myPartitionMapType1 = new PartitionMapType1();
byte myPartitionMapType1Bytes[] = myPartitionMapType1.getBytes();
if (metadataFileLocation1 > 0) {
PartitionMapType2 myPartitionMapType2 = new PartitionMapType2();
EntityID partitionTypeIdentifier = new EntityID();
partitionTypeIdentifier.setIdentifier("*UDF Metadata Partition");
partitionTypeIdentifier.IdentifierSuffix = udfVersionIdentifierSuffix;
myPartitionMapType2.setupMetadataPartitionMap(partitionTypeIdentifier, 1, 0, metadataFileLocation1,
metadataFileLocation2, 0xFFFFFFFF, metadataAllocationUnitSize, metadataAlignmentUnitSize, (byte) 0);
byte myPartitionMapType2Bytes[] = myPartitionMapType2.getBytes();
myLogicalVolumeDescriptor.NumberofPartitionMaps = 2;
myLogicalVolumeDescriptor.PartitionMaps =
new byte[myPartitionMapType1Bytes.length + myPartitionMapType2Bytes.length];