Debug.output("Got value that is too big for colortable");
if (Debug.debugging("asrp")) { Debug.output("Got value that is too big for colortable"); }
    public OMScalingRaster getBlock(int x, int y) throws IOException {        float ullat = pso - y*degPerVerBlock;        float ullon = lso + x*degPerHorBlock;        float lrlat = ullat - degPerVerBlock;        float lrlon = ullon + degPerHorBlock;        // Get image data.        if (tsi != null) {            int index = y * numHorBlocks_N + x;            // Subtracting one because the values look like they start            // with 1.            int blockOffset = ((DDFSubfield)tsi.get(index)).intValue() - 1;            if (Debug.debugging("asrp")) {                Debug.output("ASRPDirectory.getBlock: index of (" +                              x + ", " + y + ") is " + blockOffset);            }            DDFModule mod = img.getInfo();            mod.seek(tileDataOffset + blockOffset);            int byteCount = 0;  // Which data byte is being set            int numBlockPixels = numHorPixels_Q * numVerPixels_P;            byte[] data = new byte[numBlockPixels]; // image byte data            int rowCount = 0; // the per row count, should equal 128 ( numHorPixels_Q) at the end of every row            int numRow = 0;            int cpc = 0; // current pixel count for file pointer            int cpv = 0; // current pixel value for file pointer            while (byteCount < numBlockPixels) {                switch (pixelCountBits) {                case 8:                    cpc = mod.read();                    break;                case 4:                    cpc = mod.read() >> 4;                    // need to back pointer up 4 bits before reading cpv??                    Debug.output("CAUTION:  4 bit count");                    break;                default:                    cpc = 1;                }                cpv = mod.read();                                // OK, cpv has value, cpc says how many pixels that goes in.                for (int c = 0; c < cpc; c++) {                    rowCount++;                    if (colors != null && cpv > colors.length) {                        Debug.output("Got value that is too big for colortable");                    }                    data[byteCount + c] = (byte) cpv;                }                                byteCount += cpc;                if (rowCount == numHorPixels_Q) {                    rowCount = 0;                }            }            if (Debug.debugging("asrpdetail")) {                Debug.output("ASRPDirectory creating image covering (" +                             ullat + ", " +  ullon +                              "), (" + lrlat + ", " + lrlon + ")");            }            return new OMScalingRaster(ullat, ullon, lrlat, lrlon,                                       numHorPixels_Q, numVerPixels_P,                                       data, getColors(), 255);        }        return null;    }