* gnu/java/net/protocol/jar/Connection.java
(getContentLength): New method.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79332
138bc75d-0d04-0410-961f-
82ee72b054a4
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.
return jar_file;
}
+
+ public int getContentLength()
+ {
+ if (!connected)
+ return -1;
+
+ try
+ {
+ return (int) getJarEntry().getSize();
+ }
+ catch (IOException e)
+ {
+ return -1;
+ }
+ }
}