Oh, you want Java to interpret your data? No, Java can't do this. You will have to do it yourself. If you have a String and you know ahead of time that it represents a number, you can call a method like Integer.parseInt() to convert the String to an int.
Do you have a specific reason you're asking this question?
You can probably Google and find a regular expression for floating-point numbers and for integers in a few seconds. That might work. Some of the expressions here are mistaken, but you have a good chance of finding something useful there.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com