question: private void process ( ) { ArrayList < Point2D > pList = new ArrayList < Point2D > ( ) ; ArrayList < Color > cList = new ArrayList < Color > ( ) ; while ( reader . getPointer ( ) < reader . getTotalBitLen ( ) ) { Point2D p = getPointCoords ( ) ; pList . add ( p ) ; float [ ] cc = { 1f , 1f , 1f , 1f } ; for ( int z = 0 ; z < colCompCount ; z ++ ) { cc [ z ] = reader . getFloat ( bitsPerComponent ) ; } Color c = new Color ( cc [ 0 ] , cc [ 1 ] , cc [ 2 ] , cc [ 3 ] ) ; cList . add ( c ) ; } int totalRows = pList . size ( ) / verticesPerRow ; for ( int mm = 0 ; mm < ( totalRows - 1 ) ; mm ++ ) { int mRows = mm * totalRows ; for ( int nn = 0 ; nn < ( verticesPerRow - 1 ) ; nn ++ ) { int nm = nn + mRows ; int [ ] t = new int [ 6 ] ; t [ 0 ] = nm ; t [ 1 ] = t [ 3 ] = nm + 1 ; t [ 2 ] = t [ 4 ] = nm + verticesPerRow ; t [ 5 ] = nm + verticesPerRow + 1 ; for ( int z = 0 ; z < t . length ; z ++ ) { triangles . add ( pList . get ( t [ z ] ) ) ; triColors . add ( cList . get ( t [ z ] ) ) ; } } } }
target:  process the datastream and update the variables