[java]
- import java.io.File;
- import com.dd.plist.PropertyListParser;
- public class Plist {
- public static void main(String[] args) throws Exception {
- File file = new File("d:\\angryInfo.plist");
- File file1 = new File("d:\\angryInfo1.plist");
- PropertyListParser.convertToXml(file, file1) ;
- //InputStream input = Plist.class.getClassLoader().getResourceAsStream("");
- // NSDictionary rootDict = (NSDictionary) PropertyListParser.parse(file);
- //
- //
- //
- //
- // String name = rootDict.objectForKey("Name").toString();
- // NSObject[] parameters = ((NSArray) rootDict.objectForKey("Parameters")).getArray();
- // for (NSObject param : parameters) {
- //
- // System.out.println(param.toXMLPropertyList());
- //
- // if (param.getClass().equals(NSNumber.class)) {
- // NSNumber num = (NSNumber) param;
- // switch (num.type()) {
- // case NSNumber.BOOLEAN: {
- // boolean bool = num.boolValue();
- // // ...
- // break;
- // }
- // case NSNumber.INTEGER: {
- // long l = num.longValue();
- // // or int i = num.intValue();
- // // ...
- // break;
- // }
- // case NSNumber.REAL: {
- // double d = num.doubleValue();
- // // ...
- // break;
- // }
- // }
- // }
- // // else...
- // }
- }
- }
在d盘下找到angryInfo1.plist打开,已不是乱码的了,现在想要提取啥信息就尽管提取。
用到的jar下载:
免费下载地址在 http://linux.linuxidc.com/
用户名与密码都是www.linuxidc.com
具体下载目录在 /2012年资料/1月/14日/Java读取ipa中info.plist获取版本信息/
