Example usage for java.awt.image ComponentSampleModel getBankIndices

List of usage examples for java.awt.image ComponentSampleModel getBankIndices

Introduction

In this page you can find the example usage for java.awt.image ComponentSampleModel getBankIndices.

Prototype

public final int[] getBankIndices() 

Source Link

Document

Returns the bank indices for all bands.

Usage

From source file:org.geoserver.jai.ConcurrentTileFactory.java

private static long getNumBanksCSM(ComponentSampleModel csm) {
    int[] bankIndices = csm.getBankIndices();
    int maxIndex = bankIndices[0];
    for (int i = 1; i < bankIndices.length; i++) {
        int bankIndex = bankIndices[i];
        if (bankIndex > maxIndex) {
            maxIndex = bankIndex;//w ww  .j  a va 2s.co m
        }
    }
    return maxIndex + 1;
}