mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
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
@@ -1,3 +1,8 @@
|
||||
2004-03-11 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* gnu/java/net/protocol/jar/Connection.java
|
||||
(getContentLength): New method.
|
||||
|
||||
2004-03-11 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* gnu/java/net/PlainSocketImpl.java:
|
||||
|
||||
@@ -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