public void readAll ( InputStream in ) throws IOException { int read = 0 ; do { grow ( length ) ; read = data . setBytes ( length , in , data . length ( ) - length ) ; if ( read > 0 ) { length += read ; } } while ( in . available ( ) > 0 ) ; }
Read the entire stream into this array .