question: protected int [ ] readColorTable ( final int ncolors ) { final int nbytes = 3 * ncolors ; int [ ] tab = null ; final byte [ ] c = new byte [ nbytes ] ; try { rawData . get ( c ) ; tab = new int [ 256 ] ; int i = 0 ; int j = 0 ; while ( i < ncolors ) { final int r = ( c [ j ++ ] ) & 0xff ; final int g = ( c [ j ++ ] ) & 0xff ; final int b = ( c [ j ++ ] ) & 0xff ; tab [ i ++ ] = 0xff000000 | ( r << 16 ) | ( g << 8 ) | b ; } } catch ( final BufferUnderflowException e ) { Log . w ( TAG , "Format Error Reading Color Table" , e ) ; status = STATUS_FORMAT_ERROR ; } return tab ; }
target:  Reads color table as 256 RGB integer values