Changeset 242:32a6819fef61 for dwt/dwthelper/OutputStream.d
- Timestamp:
- 06/24/08 16:05:28 (7 months ago)
- Children:
- Files:
-
- dwt/dwthelper/OutputStream.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dwt/dwthelper/OutputStream.d
r212 r242 5 5 6 6 import dwt.dwthelper.utils; 7 static import tango.io.model.IConduit;8 7 9 8 public abstract class OutputStream { 10 9 11 private tango.io.model.IConduit.OutputStream ostr;12 13 10 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 11 } 23 12 … … 25 14 26 15 public void write( byte[] b ){ 27 ostr.write(b); 28 } 29 30 public void write(String c) { 31 ostr.write(c); 16 foreach( bv; b ){ 17 write(bv); 18 } 32 19 } 33 20 34 21 public void write( byte[] b, int off, int len ){ 35 implMissing( __FILE__, __LINE__);22 write(b[off .. off+len]); 36 23 } 37 24 38 25 public void flush(){ 39 ostr.flush();40 26 } 41 27 42 28 public void close(){ 43 ostr.flush();44 implMissing( __FILE__, __LINE__ );45 29 } 46 47 48 30 } 49 31
