Wednesday, January 8, 2014

iphone file operation issue

posts by BestNotes on 2012-09-22 13:48:19 Edit
I try to read data from a local file, if the file has been written there int / float /? NSString type, and does not know the NSString byte length, is there any way to get their values ​​were you?
Please let us know!
Reply:
Their top
Reply:
If you can control the write files, consider using json to deal with,
If the file is not what you write, you'll need to read the byte number of specifications, and then converted to the corresponding int / float / NSString
You can put content Tieshanglai analysis, to find the law Tony.
Reply:
reference to the second floor of the reply:
If you can control the write files, consider using json to deal with,
If the file is not what you write, you'll need to read the byte number of specifications, and then converted to the corresponding int / float / NSString
You can put content Tieshanglai analysis, to find the law Tony.


These files from the A? Ndroid take over,

I use the following approach is to obtain the equivalent type int, but NSString do not know, how can I do it?
int intSize = 4;
int i;
[_data GetBytes: & i range: NSMakeRange (_offset, intSize)]; / / _data is NSData
file

Reply:
There is no distinction between data formats do? If so you can get the data for each row and then resolve.

No comments:

Post a Comment