I want to have some static numeric and text values as an application resource. For example, my data is as follows:
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 are predefined and guaranteed to be valid.
I could read it using java.util.Scanner, but it is very slow in Android, reading a 10 kilobyte file takes minutes. It is slow due to matching the regex-based pattern inside (when I tracked it).
How could you suggest saving them?
source
share