title: Expand the tabs in Java
body: <p>Do you know a java method to expand the  chars of a text into spaces?</p>
  
  <p>My text:</p>
  
  <pre><code>1. &lt;tab&gt;  firstpoint  &lt;tab&gt; page  1
  10. &lt;tab&gt; secondpoint &lt;tab&gt; page 10
  </code></pre>
  
  <p>If I directly replace the tab by, let say, 4 spaces, I will have</p>
  
  <pre><code>1.    firstpoint    page1
  10.    secondpoint    page2
  </code></pre>
  
  <p>Instead of it, I need a method to replace each tab by the number of spaces it really corresponds to (as the command :retab of vim does). Any solution?</p>