public override int Parse(byte[] buffer, int offset)
        {
            VolumeDescriptorSequenceNumber = EndianUtilities.ToUInt32LittleEndian(buffer, offset + 16);
            PrimaryVolumeDescriptorNumber  = EndianUtilities.ToUInt32LittleEndian(buffer, offset + 20);
            VolumeIdentifier       = UdfUtilities.ReadDString(buffer, offset + 24, 32);
            VolumeSequenceNumber   = EndianUtilities.ToUInt16LittleEndian(buffer, offset + 56);
            MaxVolumeSquenceNumber = EndianUtilities.ToUInt16LittleEndian(buffer, offset + 58);
            InterchangeLevel       = EndianUtilities.ToUInt16LittleEndian(buffer, offset + 60);
            MaxInterchangeLevel    = EndianUtilities.ToUInt16LittleEndian(buffer, offset + 62);
            CharacterSetList       = EndianUtilities.ToUInt32LittleEndian(buffer, offset + 64);
            MaxCharacterSetList    = EndianUtilities.ToUInt32LittleEndian(buffer, offset + 68);
            VolumeSetIdentifier    = UdfUtilities.ReadDString(buffer, offset + 72, 128);
            DescriptorCharSet      = EndianUtilities.ToStruct <CharacterSetSpecification>(buffer, offset + 200);
            ExplanatoryCharSet     = EndianUtilities.ToStruct <CharacterSetSpecification>(buffer, offset + 264);
            VolumeAbstractExtent   = new ExtentDescriptor();
            VolumeAbstractExtent.ReadFrom(buffer, offset + 328);
            VolumeCopyrightNoticeExtent = new ExtentDescriptor();
            VolumeCopyrightNoticeExtent.ReadFrom(buffer, offset + 336);
            ApplicationIdentifier    = EndianUtilities.ToStruct <ApplicationEntityIdentifier>(buffer, offset + 344);
            RecordingTime            = UdfUtilities.ParseTimestamp(buffer, offset + 376);
            ImplementationIdentifier = EndianUtilities.ToStruct <ImplementationEntityIdentifier>(buffer, offset + 388);
            ImplementationUse        = EndianUtilities.ToByteArray(buffer, offset + 420, 64);
            PredecessorVolumeDescriptorSequenceLocation = EndianUtilities.ToUInt32LittleEndian(buffer, offset + 484);
            Flags = EndianUtilities.ToUInt16LittleEndian(buffer, offset + 488);

            return(512);
        }
        public override int Parse(byte[] buffer, int offset)
        {
            VolumeDescriptorSequenceNumber = EndianUtilities.ToUInt32LittleEndian(buffer, offset + 16);
            DescriptorCharset        = EndianUtilities.ToByteArray(buffer, offset + 20, 64);
            LogicalVolumeIdentifier  = UdfUtilities.ReadDString(buffer, offset + 84, 128);
            LogicalBlockSize         = EndianUtilities.ToUInt32LittleEndian(buffer, offset + 212);
            DomainIdentifier         = EndianUtilities.ToStruct <DomainEntityIdentifier>(buffer, offset + 216);
            LogicalVolumeContentsUse = EndianUtilities.ToByteArray(buffer, offset + 248, 16);
            MapTableLength           = EndianUtilities.ToUInt32LittleEndian(buffer, offset + 264);
            NumPartitionMaps         = EndianUtilities.ToUInt32LittleEndian(buffer, offset + 268);
            ImplementationIdentifier = EndianUtilities.ToStruct <ImplementationEntityIdentifier>(buffer, offset + 272);
            ImplementationUse        = EndianUtilities.ToByteArray(buffer, offset + 304, 128);
            IntegritySequenceExtent  = new ExtentDescriptor();
            IntegritySequenceExtent.ReadFrom(buffer, offset + 432);

            int pmOffset = 0;

            PartitionMaps = new PartitionMap[NumPartitionMaps];
            for (int i = 0; i < NumPartitionMaps; ++i)
            {
                PartitionMaps[i] = PartitionMap.CreateFrom(buffer, offset + 440 + pmOffset);
                pmOffset        += PartitionMaps[i].Size;
            }

            return(440 + (int)MapTableLength);
        }
Exemple #3
0
        public override int Parse(byte[] buffer, int offset)
        {
            MainDescriptorSequence = new ExtentDescriptor();
            MainDescriptorSequence.ReadFrom(buffer, offset + Tag.Size);

            ReserveDescriptorSequence = new ExtentDescriptor();
            ReserveDescriptorSequence.ReadFrom(buffer, offset + Tag.Size + MainDescriptorSequence.Size);

            return(512);
        }