title: moveTo method using split/replace
body: <pre><code>458.41016 425.70843 427.74316 392.55343 403.93516 370.91243 
  399.48516 366.83843 398.54916 368.02743 397.41516 372.27043 
  394.75116 382.25643 392.96616 392.69543 391.09516 402.03043 
  390.35916 405.62343 389.79116 406.92443 392.62616 409.52743 
  406.00316 421.83343 442.19716 458.07143 444.89016 482.76843 
  431.76716 528.31343 393.39116 574.56743 350.22516 594.56743 
  316.63916 610.12643 278.88716 614.34043 242.18316 610.35243 
  232.12112 609.27843 228.38012 619.29143 238.47016 621.92243 
  274.01216 631.28543 320.32416 637.73643 356.57416 628.91043 
  420.03416 613.46343 456.48216 533.71643 457.61616 470.82943
  </code></pre>
  
  <p>I have this data. They're for drawing shapes based on cubic curves, I used <code>curveTo()</code> method and I should begin with <code>moveTo()</code> method these methods are in <code>GeneralPath</code> class, each 6 points are one curve, and the last 2 points are used for <code>moveTo()</code> method. </p>
  
  <p>How can I implement that programmatically in each line the last 2 points are for <code>moveTo</code>?</p>
  
  <p>For example the first line is:  </p>
  
  <pre><code>path.moveTo(403.93516,370.91243)
  path.curveTo(458.41016, 425.70843, 427.74316, 392.55343 ,403.93516 ,370.91243) 
  </code></pre>
  
  <p>And each line the same way.
  this question is related to <a href="https://stackoverflow.com/questions/20608272/split-and-replace-methods-in-jav">Split and Replace methods in java</a></p>