Mercurial > projects > dwt-win
view dwt/dwthelper/ByteArrayOutputStream.d @ 287:35d730fb5e9f
TextLayout with wchar[] segments text and translation tables
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 21 Aug 2008 09:57:23 +0200 |
parents | 8632408a70aa |
children | f866e80af235 |
line wrap: on
line source
/** * Authors: Frank Benoit <keinfarbton@googlemail.com> */ module dwt.dwthelper.ByteArrayOutputStream; public import dwt.dwthelper.OutputStream; import dwt.dwthelper.utils; import tango.io.Buffer; public class ByteArrayOutputStream : dwt.dwthelper.OutputStream.OutputStream { protected GrowBuffer buffer; public this (){ buffer = new GrowBuffer(); } public this ( int par_size ){ buffer = new GrowBuffer(par_size); } public synchronized override void write( int b ){ byte[1] a; a[0] = b & 0xFF; buffer.append(a); } public synchronized override void write( byte[] b, int off, int len ){ buffer.append( b[ off .. off + len ]); } public synchronized override void write( byte[] b ){ buffer.append( b ); } public synchronized void writeTo( dwt.dwthelper.OutputStream.OutputStream out_KEYWORDESCAPE ){ implMissing( __FILE__, __LINE__ ); } public synchronized void reset(){ implMissing( __FILE__, __LINE__ ); } public synchronized byte[] toByteArray(){ return cast(byte[])buffer.slice(); } public int size(){ implMissing( __FILE__, __LINE__ ); return 0; } public override String toString(){ implMissing( __FILE__, __LINE__ ); return null; } public String toString( String enc ){ implMissing( __FILE__, __LINE__ ); return null; } public String toString( int hibyte ){ implMissing( __FILE__, __LINE__ ); return null; } public override void close(){ implMissing( __FILE__, __LINE__ ); } }