< prev index next >

src/java.base/share/classes/java/util/zip/DeflaterOutputStream.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, 2013, 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
*** 99,109 **** * the 4-argument constructor DeflaterOutputStream(out, def, size, false). * * @param out the output stream * @param def the compressor ("deflater") * @param size the output buffer size ! * @exception IllegalArgumentException if {@code size <= 0} */ public DeflaterOutputStream(OutputStream out, Deflater def, int size) { this(out, def, size, false); } --- 99,109 ---- * the 4-argument constructor DeflaterOutputStream(out, def, size, false). * * @param out the output stream * @param def the compressor ("deflater") * @param size the output buffer size ! * @throws IllegalArgumentException if {@code size <= 0} */ public DeflaterOutputStream(OutputStream out, Deflater def, int size) { this(out, def, size, false); }
*** 178,188 **** /** * Writes a byte to the compressed output stream. This method will * block until the byte can be written. * @param b the byte to be written ! * @exception IOException if an I/O error has occurred */ public void write(int b) throws IOException { byte[] buf = new byte[1]; buf[0] = (byte)(b & 0xff); write(buf, 0, 1); --- 178,188 ---- /** * Writes a byte to the compressed output stream. This method will * block until the byte can be written. * @param b the byte to be written ! * @throws IOException if an I/O error has occurred */ public void write(int b) throws IOException { byte[] buf = new byte[1]; buf[0] = (byte)(b & 0xff); write(buf, 0, 1);
*** 192,202 **** * Writes an array of bytes to the compressed output stream. This * method will block until all the bytes are written. * @param b the data to be written * @param off the start offset of the data * @param len the length of the data ! * @exception IOException if an I/O error has occurred */ public void write(byte[] b, int off, int len) throws IOException { if (def.finished()) { throw new IOException("write beyond end of stream"); } --- 192,202 ---- * Writes an array of bytes to the compressed output stream. This * method will block until all the bytes are written. * @param b the data to be written * @param off the start offset of the data * @param len the length of the data ! * @throws IOException if an I/O error has occurred */ public void write(byte[] b, int off, int len) throws IOException { if (def.finished()) { throw new IOException("write beyond end of stream"); }
*** 215,225 **** /** * Finishes writing compressed data to the output stream without closing * the underlying stream. Use this method when applying multiple filters * in succession to the same output stream. ! * @exception IOException if an I/O error has occurred */ public void finish() throws IOException { if (!def.finished()) { def.finish(); while (!def.finished()) { --- 215,225 ---- /** * Finishes writing compressed data to the output stream without closing * the underlying stream. Use this method when applying multiple filters * in succession to the same output stream. ! * @throws IOException if an I/O error has occurred */ public void finish() throws IOException { if (!def.finished()) { def.finish(); while (!def.finished()) {
*** 229,239 **** } /** * Writes remaining compressed data to the output stream and closes the * underlying stream. ! * @exception IOException if an I/O error has occurred */ public void close() throws IOException { if (!closed) { finish(); if (usesDefaultDeflater) --- 229,239 ---- } /** * Writes remaining compressed data to the output stream and closes the * underlying stream. ! * @throws IOException if an I/O error has occurred */ public void close() throws IOException { if (!closed) { finish(); if (usesDefaultDeflater)
< prev index next >