In a Android application I want to use Scanner class to read a list of floats from a text file (it\'s a list of vertex coordinates for OpenGL). Exact code is:
Sc
I got the exactly same problem. It took 10 minutes to read my 18 KB file. In the end I wrote a desktop application that converts those human readable numbers into machine-readable format, using DataOutputStream.
The result was astonishing.
Btw, when I traced it, most of the Scanner method calls involves regular expressions, whose implementation is provided by com.ibm.icu.**
packages (IBM ICU project). It's really overkill.
The same goes for String.format. Avoid it in Android!