I'm using dynamic table layout, in that there is image, and textview. The data is coming from an XML document. What I want is that in table the layout at runtime, I have to get the parsed image and textview. I am getting the textview correctly but not the image. I used the method LoadImageFromWebOperations for loading the image, but it gets a class cast exception and error like this:
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl$LimitedInputStream
What could be causing the exception?
EDIT code from comment
private Drawable LoadImageFromWebOperations(String friend_image) {
try {
System.out.println("friend_image "+friend_image);
InputStream is = (InputStream) new URL(friend_image).getContent();
Drawable d = Drawable.createFromStream(is, "src name");
return d;
} catch (Exception e) {
System.out.println("Exc at oadImageFromWebOperations "+e);
return null;
}
}