问题
I Have a file like shown below,
OrderNo id name count Format
1 AA1 sdflsdfsdfd 12 01
2 AB2 asdaewqrftr 13 02
3 AA3 aerefytrsu 12 01
I want to read this file and want to sort with orderNo. Please suggest me some way to read and sort.(in J2ME). Thanks...
回答1:
- Create an object representing this
- Read the file line by line ('\n' new line )
- Sort them in memory and write them back.
Note:
- Be careful about memory
来源:https://stackoverflow.com/questions/6069879/read-file-contents-in-j2me