question: protected final void loadFromStrip ( DataType dataType , int n , int size , int w , Raster raster , boolean gray ) { ByteBuffer bbuf = ByteBuffer . allocateDirect ( size ) ; bbuf . order ( byteOrder ) ; int row = 0 ; int h = 0 ; for ( int i = 0 ; i < n ; ++ i ) { bbuf . rewind ( ) ; long as = readStrip ( i , bbuf , size ) ; if ( as == - 1 ) { throw new IllegalStateException ( getTIFFError ( ) ) ; } bbuf . rewind ( ) ; h = ( int ) ( as / ( w * bytesPerSample ) ) ; if ( gray ) { raster . setAsGray ( row , 0 , rasterWidth , h , bbuf , dataType , minimum , maximum , missing ) ; } else { raster . setAsFloat ( row , 0 , rasterWidth , h , bbuf , dataType , scalingFactor , minimum , maximum , missing ) ; } row += h ; Thread . yield ( ) ; } }
target:  Load data from a strip into a raster. This method converts to float or unsigned byte depending on the value of 'gray'.