开发者

save download image in raw folder

I want to save a download image into raw folder. I tried below code for downloading image

public class Image extends FilterInputStream {
    public Image(InputStream in) {
      super(in);
    }
    public long skip(long n) throws IOException {
      long m = 0L;
      while (m < n) {
     开发者_开发问答   long _m = in.skip(n-m);
        if (_m == 0L) break;
        m += _m;
      }

      return m;
    }
}

The above code is working for downloading the image, so I want to save that download in raw folder. Please tell me the process.


You can't modify the resources folders at runtime and raw is one of them. Store the file to any other location: internal memory or external memory. Or even to the db.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜