I want to have some static numeric and text values as an application resource. For example my data is like this:
Levels 5 First_Level 500 60 1 Second_Level 500 80 1 Third_Level 200 60 1 Fourth_Level 130 30 2 Final_Level 100 30 3
... and another 300 lines...
The format and order of the data is predefined and guaranteed to be valid.
I could read it with java.util.Scanner
, but it's extremely slow in Android, reading a 10 KB file takes minutes. It's slow because of the regular-expression-based pattern matching inside (when I traceview'ed it).
What way would you suggest to store them?