Skip to content

Instantly share code, notes, and snippets.

@juristr
Created February 19, 2013 13:52
Show Gist options
  • Save juristr/4986075 to your computer and use it in GitHub Desktop.
Save juristr/4986075 to your computer and use it in GitHub Desktop.
Copy one stream onto the other
private static void CopyStream(Stream input, Stream output)
{
byte[] buffer = new byte[32768];
int read;
while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
{
output.Write(buffer, 0, read);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment