comparison dwt/dwthelper/OutputStream.d @ 0:5406a8f6526d

Add initial files
author John Reimer <terminal.node@gmail.com
date Sun, 20 Jan 2008 21:50:55 -0800
parents
children ab60f3309436
comparison
equal deleted inserted replaced
-1:000000000000 0:5406a8f6526d
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