< prev index next >

src/java.base/share/classes/java/util/jar/JarInputStream.java

Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea

*** 1,7 **** /* ! * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 54,64 **** /** * Creates a new <code>JarInputStream</code> and reads the optional * manifest. If a manifest is present, also attempts to verify * the signatures if the JarInputStream is signed. * @param in the actual input stream ! * @exception IOException if an I/O error has occurred */ public JarInputStream(InputStream in) throws IOException { this(in, true); } --- 54,64 ---- /** * Creates a new <code>JarInputStream</code> and reads the optional * manifest. If a manifest is present, also attempts to verify * the signatures if the JarInputStream is signed. * @param in the actual input stream ! * @throws IOException if an I/O error has occurred */ public JarInputStream(InputStream in) throws IOException { this(in, true); }
*** 68,78 **** * to verify the signatures if the JarInputStream is signed. * * @param in the actual input stream * @param verify whether or not to verify the JarInputStream if * it is signed. ! * @exception IOException if an I/O error has occurred */ public JarInputStream(InputStream in, boolean verify) throws IOException { super(in); this.doVerify = verify; --- 68,78 ---- * to verify the signatures if the JarInputStream is signed. * * @param in the actual input stream * @param verify whether or not to verify the JarInputStream if * it is signed. ! * @throws IOException if an I/O error has occurred */ public JarInputStream(InputStream in, boolean verify) throws IOException { super(in); this.doVerify = verify;
*** 129,141 **** /** * Reads the next ZIP file entry and positions the stream at the * beginning of the entry data. If verification has been enabled, * any invalid signature detected while positioning the stream for * the next entry will result in an exception. ! * @exception ZipException if a ZIP file error has occurred ! * @exception IOException if an I/O error has occurred ! * @exception SecurityException if any of the jar file entries * are incorrectly signed. */ public ZipEntry getNextEntry() throws IOException { JarEntry e; if (first == null) { --- 129,141 ---- /** * Reads the next ZIP file entry and positions the stream at the * beginning of the entry data. If verification has been enabled, * any invalid signature detected while positioning the stream for * the next entry will result in an exception. ! * @throws ZipException if a ZIP file error has occurred ! * @throws IOException if an I/O error has occurred ! * @throws SecurityException if any of the jar file entries * are incorrectly signed. */ public ZipEntry getNextEntry() throws IOException { JarEntry e; if (first == null) {
*** 168,180 **** * Reads the next JAR file entry and positions the stream at the * beginning of the entry data. If verification has been enabled, * any invalid signature detected while positioning the stream for * the next entry will result in an exception. * @return the next JAR file entry, or null if there are no more entries ! * @exception ZipException if a ZIP file error has occurred ! * @exception IOException if an I/O error has occurred ! * @exception SecurityException if any of the jar file entries * are incorrectly signed. */ public JarEntry getNextJarEntry() throws IOException { return (JarEntry)getNextEntry(); } --- 168,180 ---- * Reads the next JAR file entry and positions the stream at the * beginning of the entry data. If verification has been enabled, * any invalid signature detected while positioning the stream for * the next entry will result in an exception. * @return the next JAR file entry, or null if there are no more entries ! * @throws ZipException if a ZIP file error has occurred ! * @throws IOException if an I/O error has occurred ! * @throws SecurityException if any of the jar file entries * are incorrectly signed. */ public JarEntry getNextJarEntry() throws IOException { return (JarEntry)getNextEntry(); }
*** 190,206 **** * @param b the buffer into which the data is read * @param off the start offset in the destination array <code>b</code> * @param len the maximum number of bytes to read * @return the actual number of bytes read, or -1 if the end of the * entry is reached ! * @exception NullPointerException If <code>b</code> is <code>null</code>. ! * @exception IndexOutOfBoundsException If <code>off</code> is negative, * <code>len</code> is negative, or <code>len</code> is greater than * <code>b.length - off</code> ! * @exception ZipException if a ZIP file error has occurred ! * @exception IOException if an I/O error has occurred ! * @exception SecurityException if any of the jar file entries * are incorrectly signed. */ public int read(byte[] b, int off, int len) throws IOException { int n; if (first == null) { --- 190,206 ---- * @param b the buffer into which the data is read * @param off the start offset in the destination array <code>b</code> * @param len the maximum number of bytes to read * @return the actual number of bytes read, or -1 if the end of the * entry is reached ! * @throws NullPointerException If <code>b</code> is <code>null</code>. ! * @throws IndexOutOfBoundsException If <code>off</code> is negative, * <code>len</code> is negative, or <code>len</code> is greater than * <code>b.length - off</code> ! * @throws ZipException if a ZIP file error has occurred ! * @throws IOException if an I/O error has occurred ! * @throws SecurityException if any of the jar file entries * are incorrectly signed. */ public int read(byte[] b, int off, int len) throws IOException { int n; if (first == null) {
< prev index next >