Mercurial > projects > dwt-win
view dwt/dwthelper/FileOutputStream.d @ 307:10de361de572
typo
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 09 Sep 2008 06:35:22 +0200 |
parents | 32a6819fef61 |
children | 8d53428f9be0 |
line wrap: on
line source
/** * Authors: Frank Benoit <keinfarbton@googlemail.com> */ module dwt.dwthelper.FileOutputStream; public import dwt.dwthelper.File; public import dwt.dwthelper.OutputStream; import dwt.dwthelper.utils; import tango.io.FileConduit; public class FileOutputStream : dwt.dwthelper.OutputStream.OutputStream { alias dwt.dwthelper.OutputStream.OutputStream.write write; alias dwt.dwthelper.OutputStream.OutputStream.close close; FileConduit fc; public this ( String name ){ fc = new FileConduit( name, FileConduit.WriteCreate ); } public this ( String name, bool append ){ fc = new FileConduit( name, append ? FileConduit.WriteAppending : FileConduit.WriteCreate ); } public this ( dwt.dwthelper.File.File file ){ this( file.toString ); } public this ( dwt.dwthelper.File.File file, bool append ){ this( file.toString, append ); } public override void write( int b ){ ubyte[1] a; a[0] = b & 0xFF; fc.write(a); } public override void close(){ fc.close(); } public void finalize(){ implMissing( __FILE__, __LINE__ ); } }