Ejemplo n.º 1
0
        internal SymbianImageE32(string aImageName, uint aImageContentSize, long aImageContentOffset, SIStream aStream, ITracer aTracer)
            : base(aTracer, aStream, aImageName)
        {
            iContentOffsetWithinDataStream = aImageContentOffset;
            //
            using (SymbianStreamReaderLE reader = base.Stream.CreateReader())
            {
                reader.Seek(iContentOffsetWithinDataStream);
                iHeader = new SIHeaderE32Image(this, reader);
            }

            // Since we are a single e32 image, we have a single e32 Image file descriptor
            SIContentE32Image file = new SIContentE32Image(this, aImageName, aImageContentSize, aImageContentOffset);

            base.RegisterFile(file);
        }
Ejemplo n.º 2
0
        public static bool IsImageFile(Stream aStream, long aPosition)
        {
            bool ret = false;

            //
            try
            {
                using (SymbianStreamReaderLE reader = SymbianStreamReaderLE.New(aStream, SymbianStreamReaderLE.TCloseOperation.EResetPosition))
                {
                    aStream.Seek(aPosition, SeekOrigin.Begin);
                    //
                    byte[] bytes = reader.ReadBytes(SIHeaderE32Image.KMinimumSize);
                    ret = SIHeaderE32Image.IsSymbianImageHeader(bytes);
                }
            }
            catch (Exception)
            {
            }
            return(ret);
        }