diff options
| author | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-20 17:49:12 +0000 |
|---|---|---|
| committer | green <green@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-20 17:49:12 +0000 |
| commit | 57b0b1025d6ee33cfb8c6a7d18153e12f35063b5 (patch) | |
| tree | a667239f51829ad45d70131f03d739cc10cb341b /libjava/java/net/JarURLConnection.java | |
| parent | 819726c29fff3824967402e769133d2865ea8721 (diff) | |
| download | gcc-57b0b1025d6ee33cfb8c6a7d18153e12f35063b5.tar.gz | |
Sun Aug 20 09:51:48 2000 Anthony Green <green@redhat.com>
* java/net/URLClassLoader.java: Find the JarEntry via the JarFile.
* java/net/JarURLConnection.java: getEntry doesn't take any
arguments. Return null if element is null.
* java/util/zip/ZipFile.java (getInputStream): Read the compressed
size from the archive, not the inflated size.
* java/util/jar/JarFile.java (getEntry): Don't recurse. Call
java.util.zip.ZipFile.getEntry.
* gij.cc (help): Change sourceware reference to
sources.redhat.com.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35821 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/net/JarURLConnection.java')
| -rw-r--r-- | libjava/java/net/JarURLConnection.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libjava/java/net/JarURLConnection.java b/libjava/java/net/JarURLConnection.java index 86a7291ac37..60adfcd9c61 100644 --- a/libjava/java/net/JarURLConnection.java +++ b/libjava/java/net/JarURLConnection.java @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation +/* Copyright (C) 1999, 2000 Free Software Foundation This file is part of libgcj. @@ -148,11 +148,13 @@ public abstract class JarURLConnection extends URLConnection return null; } - public JarEntry getJarEntry (String name) - throws java.io.IOException + public JarEntry getJarEntry () throws java.io.IOException { JarFile jarfile = null; + if (element == null) + return null; + if (! doInput) throw new ProtocolException("Can't open JarEntry if doInput is false"); @@ -286,7 +288,7 @@ public abstract class JarURLConnection extends URLConnection if (element == null) len = jarFileURLConnection.getContentLength (); else - len = getJarEntry (element).getSize (); + len = getJarEntry ().getSize (); String line = "Content-length: " + len; hdrVec.addElement(line); |
