diff dwt/dwthelper/OutputStream.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children db5a898b2119
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/dwthelper/OutputStream.d	Sat Aug 09 17:00:02 2008 +0200
@@ -0,0 +1,50 @@
+/**
+ * Authors: Frank Benoit <keinfarbton@googlemail.com>
+ */
+module dwt.dwthelper.OutputStream;
+
+import dwt.dwthelper.utils;
+static import tango.io.model.IConduit;
+
+public abstract class OutputStream {
+
+    private tango.io.model.IConduit.OutputStream ostr;
+
+    public this(){
+    }
+
+    protected this( tango.io.model.IConduit.OutputStream aOutStream) {
+        this.ostr = aOutStream;
+    }
+
+    protected this(OutputStream rhs) {
+        ostr = rhs.ostr;
+    }
+
+    public abstract void write( int b );
+
+    public void write( byte[] b ){
+        ostr.write(b);
+    }
+
+    public void write(char[] c) {
+        ostr.write(c);
+    }
+
+    public void write( byte[] b, int off, int len ){
+        implMissing( __FILE__, __LINE__ );
+    }
+
+    public void flush(){
+        ostr.flush();
+    }
+
+    public void close(){
+        ostr.flush();
+        implMissing( __FILE__, __LINE__ );
+    }
+
+
+}
+
+