나는이 quesiton이 이미 응답되었으므로, 작동하지 않는 것 같아서 매우 furstrating ... 난 그냥 원격 파일의 크기를 얻으려고하고있다. 기계적 인조 인간. ,자바에서 원격 파일의 안드로이드 크기
1)
try
{
file = new File("http://50.19.156.118/feed2/storage/download/a_17/Madagascar.3gp");
a=(int) myFileBeingUploaded.length();
}
catch (Exception j)
{
}
2)
try
{
url = new URL("http://50.19.156.118/feed2/storage/download/a_17/Madagascar.3gp);
urlConnection = (HttpURLConnection) url.openConnection();
a=urlConnection.getContentLength();
}
catch (Exception e)
{
}
대해 getContentLength()는 항상 77!를 반환 File.length 동안 : 지금까지 내가 성공하지 않고, 다음과 같은 두 가지 방법을 시도()는 0을 반환합니다
아이디어가 있으십니까? 많은 감사