예제 #1
0
        private String DecodePListFile(String inFile)
        {
            String plist = null;

            try {
                plist = CFPropertyList.PropertyListToXML(ReadFile(inFile));
            }
            catch (Exception err) {
                plist = ReadTextFile(inFile, 1024);
            }
            return(plist);
        }
예제 #2
0
        private String DecodePListData(Byte[] inData)
        {
            String  plist        = null;
            Boolean decodeFailed = false;

            try {
                plist = CFPropertyList.PropertyListToXML(inData);
                if (plist == null)
                {
                    decodeFailed = true;
                }
            }
            catch (Exception err) {
                decodeFailed = true;
                Console.WriteLine(err.Message);
            }
            if (decodeFailed)
            {
                plist = System.Text.Encoding.ASCII.GetString(inData);
            }
            return(plist);
        }