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:
committed by
Michael Koch
parent
fb36b57afc
commit
950d83e765
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user