protected final void loadFromStrip(DataType dataType,int numStrips,int size,int width,int height,Raster raster,boolean gray) throws IOException {
  if (iStream != null) {
    iStream.close();
  }
  iStream=new FileImageInputStream(new File(dataFilePath));
  iStream.seek(imageStart);
  byte[] bbArray=new byte[size];
  ByteBuffer bbuf=ByteBuffer.wrap(bbArray);
  bbuf.order(byteOrder);
  bbuf.rewind();
  int r=0;
  for (int i=0; i < numStrips; ++i) {
    int h=Math.min(rasterLength - height * i,height);
    int len=h * width * bytesPerSample;
    iStream.read(bbArray,0,len);
    bbuf.rewind();
    bbuf.limit(len);
    if (gray) {
      raster.setAsGray(r,0,rasterWidth,h,bbuf,dataType,minimum,maximum,missing);
    }
 else {
      raster.setAsFloat(r,0,rasterWidth,h,bbuf,dataType,scalingFactor,minimum,maximum,missing);
    }
    r+=h;
  }
}

protected final void loadFromStrip ( DataType dataType , int numStrips , int size , int width , int height , Raster raster , boolean gray ) throws IOException { if ( iStream != null ) { iStream . close ( ) ; } iStream = new FileImageInputStream ( new File ( dataFilePath ) ) ; iStream . seek ( imageStart ) ; byte [ ] bbArray = new byte [ size ] ; ByteBuffer bbuf = ByteBuffer . wrap ( bbArray ) ; bbuf . order ( byteOrder ) ; bbuf . rewind ( ) ; int r = 0 ; for ( int i = 0 ; i < numStrips ; ++ i ) { int h = Math . min ( rasterLength - height * i , height ) ; int len = h * width * bytesPerSample ; iStream . read ( bbArray , 0 , len ) ; bbuf . rewind ( ) ; bbuf . limit ( len ) ; if ( gray ) { raster . setAsGray ( r , 0 , rasterWidth , h , bbuf , dataType , minimum , maximum , missing ) ; } else { raster . setAsFloat ( r , 0 , rasterWidth , h , bbuf , dataType , scalingFactor , minimum , maximum , missing ) ; } r += h ; } }
load data from a strip file into a raster , converting data .
