erdemolkun / plist

Automatically exported from code.google.com/p/plist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

java.lang.ClassCastException: android.content.res.AssetManager$AssetInputStream cannot be cast to com.dd.plist.Base64$InputStream

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?

try {
   InputStream is = (InputStream)      this.getResources().openRawResource(R.raw.page001);
  NSDictionary rootDict = (NSDictionary)PropertyListParser.parse(is);
 TV.setText(rootDict.count());
 Log.e("tttttt",""+rootDict.count());  
} catch(Exception ex) {
TV.setText(ex.toString());
Log.e("tttttt", ex.toString());
}

What is the expected output? What do you see instead?
Exception 
java.lang.ClassCastException: android.content.res.AssetManager$AssetInputStream 
cannot be cast to com.dd.plist.Base64$InputStream

What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by maatkiib...@gmail.com on 17 Aug 2014 at 6:15

Attachments:

You have imported the wrong InputStream (com.dd.plist.Base64.InputStream) in 
your Java class. That is a custom class to which the input stream returned by 
openRawResource cannot be cast. Please use java.io.InputStream instead.

Original comment by daniel.dreibrodt on 17 Aug 2014 at 7:03

  • Changed title: java.lang.ClassCastException: android.content.res.AssetManager$AssetInputStream cannot be cast to com.dd.plist.Base64$InputStream
  • Changed state: Invalid
  • Added labels: Type-Other
  • Removed labels: Type-Defect