Getting the last token String
<p>I have a application that needs to read a <code>String</code> buffer that is semi-colon '<code>;</code>' delimited. </p>

<pre><code>String buff = foo.getBuff(); // returns the buffer
</code></pre>

<p>However, the buffer can get pretty large and I just need to get the last String <em>token</em> and then flush the temporary variable <code>String buff</code> so my app won't accumulate much memory.</p>

<p><strong>Update:</strong></p>

<p>I tried this code: </p>

<pre><code>String lastToken = buff.substring(buff.lastIndexOf(";") + 1);
</code></pre>

<p>However, I am not getting result with this code above, compared to this:</p>

<pre><code>List&lt;String&gt; slist = Arrays.asList(buff.split(";"));
String lastToken = slist.get(slist.size() - 1);
</code></pre>

<p>However using List is very slow. My web app is almost not responding when processing this.</p>
