~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to contrib/Sharpen/Sharpen/PipedOutputStream.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
namespace Sharpen
 
2
{
 
3
        using System;
 
4
 
 
5
        internal class PipedOutputStream : OutputStream
 
6
        {
 
7
                PipedInputStream ips;
 
8
 
 
9
                public PipedOutputStream ()
 
10
                {
 
11
                }
 
12
 
 
13
                public PipedOutputStream (PipedInputStream iss) : this()
 
14
                {
 
15
                        Attach (iss);
 
16
                }
 
17
 
 
18
                public override void Close ()
 
19
                {
 
20
                        ips.Close ();
 
21
                        base.Close ();
 
22
                }
 
23
 
 
24
                internal void Attach (PipedInputStream iss)
 
25
                {
 
26
                        ips = iss;
 
27
                }
 
28
 
 
29
                public override void Write (int b)
 
30
                {
 
31
                        ips.Write (b);
 
32
                }
 
33
 
 
34
                public override void Write (byte[] b, int offset, int len)
 
35
                {
 
36
                        ips.Write (b, offset, len);
 
37
                }
 
38
        }
 
39
}