question: protected final void computeMinMaxFromTile ( DataType dataType , int n , int size ) { minimum = new double [ samplesPerPixel ] ; maximum = new double [ samplesPerPixel ] ; Arrays . fill ( minimum , Double . MAX_VALUE ) ; Arrays . fill ( maximum , - Double . MAX_VALUE ) ; ByteBuffer bbuf = ByteBuffer . allocateDirect ( size ) ; bbuf . order ( byteOrder ) ; for ( int i = 0 ; i < n ; ++ i ) { bbuf . rewind ( ) ; long len = readTile ( i , bbuf , size ) ; if ( len == - 1 ) { throw new IllegalStateException ( getTIFFError ( ) ) ; } bbuf . rewind ( ) ; computeMinMax ( bbuf ) ; Thread . yield ( ) ; } }
target:  Compute the minimum and maximum of an entire file.