Generic function for int, short, long
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2721546/why-dont-generics-support-primitive-types">Why don&#39;t Generics support primitive types?</a>  </p>
</blockquote>



<p>I want to make one function for int, short and long. I have this in 3 almost  identically function.</p>

<pre><code>    private &lt;T extends Number &gt; T scanTInteger() throws IOException, NumberFormatException
{
    T number = 0;
</code></pre>

<p>But i don't knew how to do generic type like int, short, long. For Object it is easy. 
Is there is method for that.
EDIT
Ok i knew how to do that with out generic function. I will use only long and max size of primitive types and at the end convert it. If someone find how to do with generic i will be happy :)</p>
