< prev index next >

src/java.base/share/classes/java/net/JarURLConnection.java

Print this page




 237      */
 238     public Manifest getManifest() throws IOException {
 239         return getJarFile().getManifest();
 240     }
 241 
 242     /**
 243      * Return the JAR entry object for this connection, if any. This
 244      * method returns null if the JAR file URL corresponding to this
 245      * connection points to a JAR file and not a JAR file entry.
 246      *
 247      * @return the JAR entry object for this connection, or null if
 248      * the JAR URL for this connection points to a JAR file.
 249      *
 250      * @exception IOException if getting the JAR file for this
 251      * connection causes an IOException to be thrown.
 252      *
 253      * @see #getJarFile
 254      * @see #getJarEntry
 255      */
 256     public JarEntry getJarEntry() throws IOException {
 257         return entryName == null ? null : getJarFile().getJarEntry(entryName);
 258     }
 259 
 260     /**
 261      * Return the Attributes object for this connection if the URL
 262      * for it points to a JAR file entry, null otherwise.
 263      *
 264      * @return the Attributes object for this connection if the URL
 265      * for it points to a JAR file entry, null otherwise.
 266      *
 267      * @exception IOException if getting the JAR entry causes an
 268      * IOException to be thrown.
 269      *
 270      * @see #getJarEntry
 271      */
 272     public Attributes getAttributes() throws IOException {
 273         JarEntry e = getJarEntry();
 274         return e != null ? e.getAttributes() : null;
 275     }
 276 
 277     /**




 237      */
 238     public Manifest getManifest() throws IOException {
 239         return getJarFile().getManifest();
 240     }
 241 
 242     /**
 243      * Return the JAR entry object for this connection, if any. This
 244      * method returns null if the JAR file URL corresponding to this
 245      * connection points to a JAR file and not a JAR file entry.
 246      *
 247      * @return the JAR entry object for this connection, or null if
 248      * the JAR URL for this connection points to a JAR file.
 249      *
 250      * @exception IOException if getting the JAR file for this
 251      * connection causes an IOException to be thrown.
 252      *
 253      * @see #getJarFile
 254      * @see #getJarEntry
 255      */
 256     public JarEntry getJarEntry() throws IOException {
 257         return getJarFile().getJarEntry(entryName);
 258     }
 259 
 260     /**
 261      * Return the Attributes object for this connection if the URL
 262      * for it points to a JAR file entry, null otherwise.
 263      *
 264      * @return the Attributes object for this connection if the URL
 265      * for it points to a JAR file entry, null otherwise.
 266      *
 267      * @exception IOException if getting the JAR entry causes an
 268      * IOException to be thrown.
 269      *
 270      * @see #getJarEntry
 271      */
 272     public Attributes getAttributes() throws IOException {
 273         JarEntry e = getJarEntry();
 274         return e != null ? e.getAttributes() : null;
 275     }
 276 
 277     /**


< prev index next >