protected final void loadFromStrip(int numStrips,int size,int width,int height,Raster raster) 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);
  int r=0;
  for (int i=0; i < numStrips; ++i) {
    bbuf.rewind();
    int h=Math.min(rasterLength - height * i,height);
    int len=h * width * bytesPerSample;
    len=iStream.read(bbArray,0,len);
    bbuf.rewind();
    raster.set(r,h,bbArray);
    r+=h;
  }
}

protected final void loadFromStrip ( int numStrips , int size , int width , int height , Raster raster ) 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 ) ; int r = 0 ; for ( int i = 0 ; i < numStrips ; ++ i ) { bbuf . rewind ( ) ; int h = Math . min ( rasterLength - height * i , height ) ; int len = h * width * bytesPerSample ; len = iStream . read ( bbArray , 0 , len ) ; bbuf . rewind ( ) ; raster . set ( r , h , bbArray ) ; r += h ; } }
load data from a strip into a raster with no conversion .
