Mercurial > projects > dwt2
view base/src/java/io/InputStream.d @ 125:c43718956f21 default tip
Updated the snippets status.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Thu, 11 Aug 2011 19:55:14 +0200 |
parents | 536e43f63c81 |
children |
line wrap: on
line source
/** * Authors: Frank Benoit <keinfarbton@googlemail.com> */ module java.io.InputStream; import java.lang.all; public abstract class InputStream { public this (){ } public abstract int read(); public int read( byte[] b ){ foreach( uint idx, ref byte val; b ){ int c = read(); if( c == -1 ){ return ( idx == 0 ) ? -1 : idx; } b[ idx] = cast(byte)( c & 0xFF ); } return b.length; } public int read( byte[] b, int off, int len ){ return read( b[ off .. off+len ] ); } public long skip( long n ){ implMissing( __FILE__, __LINE__ ); return 0L; } public int available(){ return 0; } public void close(){ implMissing( __FILE__, __LINE__ ); } public synchronized void mark( int readlimit ){ implMissing( __FILE__, __LINE__ ); } public synchronized void reset(){ implMissing( __FILE__, __LINE__ ); } public bool markSupported(){ implMissing( __FILE__, __LINE__ ); return false; } }