Recurity.Swf.Tag.ReadContent C# (CSharp) Method

ReadContent() public method

public ReadContent ( Stream input ) : MemoryStream
input Stream
return System.IO.MemoryStream
        public MemoryStream ReadContent(Stream input)
        {
            // save stream position for later restoration
            long previousPosition = input.Position;

            // go to the tag and read it
            input.Seek((long)this.OffsetData, SeekOrigin.Begin);

            BinaryReader br = new BinaryReader(input);
            byte[] tempBuffer = br.ReadBytes((int)this.Length);

            // restore previous stream position
            input.Seek(previousPosition, SeekOrigin.Begin);
            return new MemoryStream(tempBuffer);
        }