Parse String to Integer throws NullpointerException
<p>Hy!</p>

<p>I want to parse a String to a Integer.
The String is like the format for series: SXXEXXX</p>

<p>The Code should increase the episode.</p>

<p>Like: S01E01 --> S01E02
Also: S01E100 --> S01E101</p>

<p>Code:</p>

<pre><code>String s = episodes.get(episodes.size()-1);
Log.e("DBManager",s);
if (s.split("E").length &lt;= 2) {
    int i = Integer.getInteger(s.split("E")[1].split(" ")[0]); //NullPointerEx
    return s.split("E")[0]+"E"+String.valueOf(i++);
}
</code></pre>

<p>Log:</p>

<pre><code>10-26 15:56:34.635: E/DBManager(932): S00E01
</code></pre>
