Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Common/Auxiliary/StreamExtensions.cs @ 12503

Last change on this file since 12503 was 12503, checked in by aballeit, 9 years ago

#2283 added GUI and charts; fixed MCTS

File size: 609 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.IO;
6
7namespace 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.