question: private void checkBuf ( int pointCount , boolean checkMove ) { if ( checkMove && typeSize == 0 ) { throw new IndexOutOfBoundsException ( "First segment must be a moveto" ) ; } if ( typeSize == types . length ) { byte tmp [ ] = new byte [ typeSize + BUFFER_CAPACITY ] ; System . arraycopy ( types , 0 , tmp , 0 , typeSize ) ; types = tmp ; } if ( pointSize + pointCount > points . length ) { float tmp [ ] = new float [ pointSize + Math . max ( BUFFER_CAPACITY * 2 , pointCount ) ] ; System . arraycopy ( points , 0 , tmp , 0 , pointSize ) ; points = tmp ; } }
target:  Checks points and types buffer size to add pointCount points. If necessary realloc buffers to enlarge size.