Commit 950d83e7 by Michael Koch Committed by Michael Koch

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

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

From-SVN: r79332
parent fb36b57a
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:
Reformated to merge better with classpath's version.
......
......@@ -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;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment