code_junkie

How to write the content of one stream into another stream in .net?

Nov 11th, 2011
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. static void CopyStream(Stream input, Stream output){
  2. byte[] buffer = new byte[0x1000];
  3. int read;
  4. while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
  5. output.Write(buffer, 0, read);
  6. }
Add Comment
Please, Sign In to add comment