2004-03-11 Michael Koch <konqueror@gmx.de>

* gnu/java/net/protocol/jar/Connection.java
	(getContentLength): New method.

From-SVN: r79332
This commit is contained in:
Michael Koch 2004-03-11 17:06:11 +00:00 committed by Michael Koch
parent fb36b57afc
commit 950d83e765
2 changed files with 20 additions and 0 deletions

View file

@ -218,4 +218,19 @@ public final class Connection extends JarURLConnection
return jar_file;
}
public int getContentLength()
{
if (!connected)
return -1;
try
{
return (int) getJarEntry().getSize();
}
catch (IOException e)
{
return -1;
}
}
}