开发者

how to calculate size of a file ,when file resides on server

I have to create 开发者_运维技巧progressbar so that i need the size of a file.so please give me the sample code that i can calculate size of server side file.


long fileSize = new FileInputStream(filePath).getChannel().size();

For the record, when you google "android calculate size of file on disk" this page comes up. So, I'm answering that question, even though the title of this is pretty odd. Maybe someone else with more power can rewrite the question or something.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜