public CommonVolumeDescriptor(byte[] src, int offset, Encoding enc) : base(src, offset) { CharacterEncoding = enc; SystemIdentifier = IsoUtilities.ReadChars(src, offset + 8, 32, CharacterEncoding); VolumeIdentifier = IsoUtilities.ReadChars(src, offset + 40, 32, CharacterEncoding); VolumeSpaceSize = IsoUtilities.ToUInt32FromBoth(src, offset + 80); VolumeSetSize = IsoUtilities.ToUInt16FromBoth(src, offset + 120); VolumeSequenceNumber = IsoUtilities.ToUInt16FromBoth(src, offset + 124); LogicalBlockSize = IsoUtilities.ToUInt16FromBoth(src, offset + 128); PathTableSize = IsoUtilities.ToUInt32FromBoth(src, offset + 132); TypeLPathTableLocation = EndianUtilities.ToUInt32LittleEndian(src, offset + 140); OptionalTypeLPathTableLocation = EndianUtilities.ToUInt32LittleEndian(src, offset + 144); TypeMPathTableLocation = Utilities.BitSwap(EndianUtilities.ToUInt32LittleEndian(src, offset + 148)); OptionalTypeMPathTableLocation = Utilities.BitSwap(EndianUtilities.ToUInt32LittleEndian(src, offset + 152)); DirectoryRecord.ReadFrom(src, offset + 156, CharacterEncoding, out RootDirectory); VolumeSetIdentifier = IsoUtilities.ReadChars(src, offset + 190, 318 - 190, CharacterEncoding); PublisherIdentifier = IsoUtilities.ReadChars(src, offset + 318, 446 - 318, CharacterEncoding); DataPreparerIdentifier = IsoUtilities.ReadChars(src, offset + 446, 574 - 446, CharacterEncoding); ApplicationIdentifier = IsoUtilities.ReadChars(src, offset + 574, 702 - 574, CharacterEncoding); CopyrightFileIdentifier = IsoUtilities.ReadChars(src, offset + 702, 739 - 702, CharacterEncoding); AbstractFileIdentifier = IsoUtilities.ReadChars(src, offset + 739, 776 - 739, CharacterEncoding); BibliographicFileIdentifier = IsoUtilities.ReadChars(src, offset + 776, 813 - 776, CharacterEncoding); CreationDateAndTime = IsoUtilities.ToDateTimeFromVolumeDescriptorTime(src, offset + 813); ModificationDateAndTime = IsoUtilities.ToDateTimeFromVolumeDescriptorTime(src, offset + 830); ExpirationDateAndTime = IsoUtilities.ToDateTimeFromVolumeDescriptorTime(src, offset + 847); EffectiveDateAndTime = IsoUtilities.ToDateTimeFromVolumeDescriptorTime(src, offset + 864); FileStructureVersion = src[offset + 881]; }
private DateTime ReadTimestamp(Timestamps timestamp, byte[] data, bool longForm, ref int pos) { DateTime result = DateTime.MinValue; if ((TimestampsPresent & timestamp) != 0) { if (longForm) { result = IsoUtilities.ToDateTimeFromVolumeDescriptorTime(data, pos); pos += 17; } else { result = IsoUtilities.ToUTCDateTimeFromDirectoryTime(data, pos); pos += 7; } } return(result); }