Mercurial > projects > dwt-linux
comparison dwt/dwthelper/OutputStream.d @ 12:0c78fa47d476
helper classes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 06 Jan 2008 19:36:29 +0100 |
parents | |
children | 380bad9f6852 |
comparison
equal
deleted
inserted
replaced
11:5f725d09c076 | 12:0c78fa47d476 |
---|---|
1 /** | |
2 * Authors: Frank Benoit <keinfarbton@googlemail.com> | |
3 */ | |
4 module dwt.dwthelper.OutputStream; | |
5 | |
6 import dwt.dwthelper.utils; | |
7 static import tango.io.model.IConduit; | |
8 | |
9 public abstract class OutputStream { | |
10 | |
11 private tango.io.model.IConduit.OutputStream ostr; | |
12 | |
13 public this(){ | |
14 } | |
15 | |
16 protected this( tango.io.model.IConduit.OutputStream aOutStream) { | |
17 this.ostr = aOutStream; | |
18 } | |
19 | |
20 protected this(OutputStream rhs) { | |
21 ostr = rhs.ostr; | |
22 } | |
23 | |
24 public abstract void write( int b ); | |
25 | |
26 public void write( byte[] b ){ | |
27 ostr.write(b); | |
28 } | |
29 | |
30 public void write(char[] c) { | |
31 ostr.write(c); | |
32 } | |
33 | |
34 public void write( byte[] b, int off, int len ){ | |
35 implMissing( __FILE__, __LINE__ ); | |
36 } | |
37 | |
38 public void flush(){ | |
39 ostr.flush(); | |
40 } | |
41 | |
42 public void close(){ | |
43 ostr.flush(); | |
44 implMissing( __FILE__, __LINE__ ); | |
45 } | |
46 | |
47 | |
48 } | |
49 | |
50 |