开发者

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

开发者 https://www.devze.com 2023-01-20 15:27 出处:网络
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(filePa

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

精彩评论

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