< prev index next >

src/java.base/share/classes/java/util/zip/CheckedInputStream.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) 1996, 2006, 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) 1996, 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
*** 52,62 **** } /** * Reads a byte. Will block if no input is available. * @return the byte read, or -1 if the end of the stream is reached. ! * @exception IOException if an I/O error has occurred */ public int read() throws IOException { int b = in.read(); if (b != -1) { cksum.update(b); --- 52,62 ---- } /** * Reads a byte. Will block if no input is available. * @return the byte read, or -1 if the end of the stream is reached. ! * @throws IOException if an I/O error has occurred */ public int read() throws IOException { int b = in.read(); if (b != -1) { cksum.update(b);
*** 71,85 **** * @param buf 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 read * @return the actual number of bytes read, or -1 if the end * of the stream is reached. ! * @exception NullPointerException If <code>buf</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>buf.length - off</code> ! * @exception IOException if an I/O error has occurred */ public int read(byte[] buf, int off, int len) throws IOException { len = in.read(buf, off, len); if (len != -1) { cksum.update(buf, off, len); --- 71,85 ---- * @param buf 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 read * @return the actual number of bytes read, or -1 if the end * of the stream is reached. ! * @throws NullPointerException If <code>buf</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>buf.length - off</code> ! * @throws IOException if an I/O error has occurred */ public int read(byte[] buf, int off, int len) throws IOException { len = in.read(buf, off, len); if (len != -1) { cksum.update(buf, off, len);
*** 89,99 **** /** * Skips specified number of bytes of input. * @param n the number of bytes to skip * @return the actual number of bytes skipped ! * @exception IOException if an I/O error has occurred */ public long skip(long n) throws IOException { byte[] buf = new byte[512]; long total = 0; while (total < n) { --- 89,99 ---- /** * Skips specified number of bytes of input. * @param n the number of bytes to skip * @return the actual number of bytes skipped ! * @throws IOException if an I/O error has occurred */ public long skip(long n) throws IOException { byte[] buf = new byte[512]; long total = 0; while (total < n) {
< prev index next >