< prev index next >

src/java.base/share/classes/java/io/BufferedWriter.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, 2016, 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
*** 87,97 **** * buffer of the given size. * * @param out A Writer * @param sz Output-buffer size, a positive integer * ! * @exception IllegalArgumentException If {@code sz <= 0} */ public BufferedWriter(Writer out, int sz) { super(out); if (sz <= 0) throw new IllegalArgumentException("Buffer size <= 0"); --- 87,97 ---- * buffer of the given size. * * @param out A Writer * @param sz Output-buffer size, a positive integer * ! * @throws IllegalArgumentException If {@code sz <= 0} */ public BufferedWriter(Writer out, int sz) { super(out); if (sz <= 0) throw new IllegalArgumentException("Buffer size <= 0");
*** 123,133 **** } /** * Writes a single character. * ! * @exception IOException If an I/O error occurs */ public void write(int c) throws IOException { synchronized (lock) { ensureOpen(); if (nextChar >= nChars) --- 123,133 ---- } /** * Writes a single character. * ! * @throws IOException If an I/O error occurs */ public void write(int c) throws IOException { synchronized (lock) { ensureOpen(); if (nextChar >= nChars)
*** 238,257 **** /** * Writes a line separator. The line separator string is defined by the * system property {@code line.separator}, and is not necessarily a single * newline ('\n') character. * ! * @exception IOException If an I/O error occurs */ public void newLine() throws IOException { write(System.lineSeparator()); } /** * Flushes the stream. * ! * @exception IOException If an I/O error occurs */ public void flush() throws IOException { synchronized (lock) { flushBuffer(); out.flush(); --- 238,257 ---- /** * Writes a line separator. The line separator string is defined by the * system property {@code line.separator}, and is not necessarily a single * newline ('\n') character. * ! * @throws IOException If an I/O error occurs */ public void newLine() throws IOException { write(System.lineSeparator()); } /** * Flushes the stream. * ! * @throws IOException If an I/O error occurs */ public void flush() throws IOException { synchronized (lock) { flushBuffer(); out.flush();
< prev index next >