Something like System.Diagnostics.Process.Start to run a stream

Posted by phenevo on Stack Overflow See other posts from Stack Overflow or by phenevo
Published on 2010-05-27T10:08:30Z Indexed on 2010/05/27 10:11 UTC
Read the original article Hit count: 287

Filed under:
|

Hi,

I get from server images and videos by stream. Now I'm saving it:

 Stream str = client.GetFile(path);
                    using (var outStream = new FileStream(@"c:\myFile.jpg", FileMode.Create))
                    {
                        var buffer = new byte[4096];
                        int count;
                        while ((count = str.Read(buffer, 0, buffer.Length)) > 0)
                        {
                            outStream.Write(buffer, 0, count);
                        }
                    }

I can be jpg, mpg, flv and a lot of other multimedia types (Before I get stream I know what is a extension of this file).

Now I want to not save it , bu run direct from stream.

Is it possible ??

© Stack Overflow or respective owner

Related posts about c#

Related posts about filestream