Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.IO;
|
---|
6 |
|
---|
7 | namespace Microsoft.Research.DynamicDataDisplay.Common.Auxiliary
|
---|
8 | {
|
---|
9 | public static class StreamExtensions
|
---|
10 | {
|
---|
11 | public static void CopyTo(this Stream input, Stream output)
|
---|
12 | {
|
---|
13 | byte[] buffer = new byte[32768];
|
---|
14 | while (true)
|
---|
15 | {
|
---|
16 | int read = input.Read(buffer, 0, buffer.Length);
|
---|
17 | if (read <= 0)
|
---|
18 | return;
|
---|
19 | output.Write(buffer, 0, read);
|
---|
20 | }
|
---|
21 | }
|
---|
22 | }
|
---|
23 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.