question: private boolean isInterleaved ( ComponentSampleModel sm ) { int numBands = sampleModel . getNumBands ( ) ; if ( numBands == 1 ) { return true ; } int [ ] bankIndices = sm . getBankIndices ( ) ; for ( int i = 0 ; i < numBands ; i ++ ) { if ( bankIndices [ i ] != 0 ) { return false ; } } int [ ] bandOffsets = sm . getBandOffsets ( ) ; int minOffset = bandOffsets [ 0 ] ; int maxOffset = minOffset ; for ( int i = 1 ; i < numBands ; i ++ ) { int offset = bandOffsets [ i ] ; if ( offset < minOffset ) { minOffset = offset ; } if ( offset > maxOffset ) { maxOffset = offset ; } } if ( maxOffset - minOffset >= sm . getPixelStride ( ) ) { return false ; } return true ; }
target:  Analyzes a ComponentSampleModel to determine if it can function as a PixelInterleavedSampleModel.  In order to do so, it must use only bank 0 of its DataBuffer, and the data offsets must span a range of less than pixelStride. <p> These properties are trivially true for a 1-banded SampleModel.