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:
parent
fb36b57afc
commit
950d83e765
2 changed files with 20 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue