Why does DataInputStream not support integers?
Posted
by Jason
on Stack Overflow
See other posts from Stack Overflow
or by Jason
Published on 2010-04-05T00:37:32Z
Indexed on
2010/04/05
0:43 UTC
Read the original article
Hit count: 330
I need to read in a list of numbers from a file, none of which are larger than 32767. Originally I was going to use the Scanner class to pull in the data, then I read about DataInputStream. This would work well for me, except that according to the API, it supports all primitive variables EXCEPT ints! Listed are longs, shorts, bytes, chars, booleans, ect, but no ints. I have no need for double precision from the incoming data.
Is this a deliberate or unintentional oversight?
© Stack Overflow or respective owner