Пример #1
0
        public int ReadFrom(byte[] buffer, int offset)
        {
            DescriptorTag           = Utilities.ToStruct <DescriptorTag>(buffer, offset);
            FileVersionNumber       = Utilities.ToUInt16LittleEndian(buffer, offset + 16);
            FileCharacteristics     = (FileCharacteristic)buffer[offset + 18];
            NameLength              = buffer[offset + 19];
            FileLocation            = Utilities.ToStruct <LongAllocationDescriptor>(buffer, offset + 20);
            ImplementationUseLength = Utilities.ToUInt16LittleEndian(buffer, offset + 36);
            ImplementationUse       = Utilities.ToByteArray(buffer, offset + 38, ImplementationUseLength);
            Name = UdfUtilities.ReadDCharacters(buffer, offset + 38 + ImplementationUseLength, NameLength);

            return(Utilities.RoundUp(38 + ImplementationUseLength + NameLength, 4));
        }
Пример #2
0
        public int ReadFrom(byte[] buffer, int offset)
        {
            DescriptorTag = Utilities.ToStruct<DescriptorTag>(buffer, offset);
            FileVersionNumber = Utilities.ToUInt16LittleEndian(buffer, offset + 16);
            FileCharacteristics = (FileCharacteristic)buffer[offset + 18];
            NameLength = buffer[offset + 19];
            FileLocation = Utilities.ToStruct<LongAllocationDescriptor>(buffer, offset + 20);
            ImplementationUseLength = Utilities.ToUInt16LittleEndian(buffer, offset + 36);
            ImplementationUse = Utilities.ToByteArray(buffer, offset + 38, ImplementationUseLength);
            Name = UdfUtilities.ReadDCharacters(buffer, offset + 38 + ImplementationUseLength, NameLength);

            return Utilities.RoundUp(38 + ImplementationUseLength + NameLength, 4);
        }