开发者

NSCoding to java

Hee,

I currently am using NSCoding to write my objects to data and save them to an file in ob开发者_开发技巧jective-c. Does anybody know if there is a way to use the same coding to decode the object structure in an Java application?

Thanks


Quite probably the easiest way is to use the third-party plist Java library.

Otherwise, you've got the problem that OS X supports two different types of property list — XML and binary. XML's easy enough and the relevant wikipedia page even includes a quick summary of the tags. You can use the command line tool plutil to convert any property list to XML format but the default is binary so that's not much help if you need there to be no manual step in between.

Apple don't seem to have a formal documentation of the binary format, but their code is open source so you can reverse engineer it from here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜