Mats Stijlaart
Mats Stijlaart

Reputation: 5098

NSCoding to java

Hee,

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

Thanks

Upvotes: 0

Views: 682

Answers (1)

Tommy
Tommy

Reputation: 100662

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.

Upvotes: 2

Related Questions