- 网络文件
URL url = new URL(strUrl);
HttpURLConnection httpconn = (HttpURLConnection)url.openConnection();
httpconn.getContentLength();
- 本地文件
InputStream inputStream = urlCon.getInputStream();
inputStream.available();
URL url = new URL(strUrl);
HttpURLConnection httpconn = (HttpURLConnection)url.openConnection();
httpconn.getContentLength();
InputStream inputStream = urlCon.getInputStream();
inputStream.available();