equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
85 * |
85 * |
86 * @param charsetName |
86 * @param charsetName |
87 * The name of a supported |
87 * The name of a supported |
88 * {@link java.nio.charset.Charset charset} |
88 * {@link java.nio.charset.Charset charset} |
89 * |
89 * |
90 * @exception UnsupportedEncodingException |
90 * @throws UnsupportedEncodingException |
91 * If the named encoding is not supported |
91 * If the named encoding is not supported |
92 */ |
92 */ |
93 public OutputStreamWriter(OutputStream out, String charsetName) |
93 public OutputStreamWriter(OutputStream out, String charsetName) |
94 throws UnsupportedEncodingException |
94 throws UnsupportedEncodingException |
95 { |
95 { |
162 * name, being unique for the encoding, may differ from the name passed to |
162 * name, being unique for the encoding, may differ from the name passed to |
163 * the constructor. This method may return {@code null} if the stream has |
163 * the constructor. This method may return {@code null} if the stream has |
164 * been closed. </p> |
164 * been closed. </p> |
165 * |
165 * |
166 * @return The historical name of this encoding, or possibly |
166 * @return The historical name of this encoding, or possibly |
167 * <code>null</code> if the stream has been closed |
167 * {@code null} if the stream has been closed |
168 * |
168 * |
169 * @see java.nio.charset.Charset |
169 * @see java.nio.charset.Charset |
170 * |
170 * |
171 * @revised 1.4 |
171 * @revised 1.4 |
172 * @spec JSR-51 |
172 * @spec JSR-51 |
185 } |
185 } |
186 |
186 |
187 /** |
187 /** |
188 * Writes a single character. |
188 * Writes a single character. |
189 * |
189 * |
190 * @exception IOException If an I/O error occurs |
190 * @throws IOException If an I/O error occurs |
191 */ |
191 */ |
192 public void write(int c) throws IOException { |
192 public void write(int c) throws IOException { |
193 se.write(c); |
193 se.write(c); |
194 } |
194 } |
195 |
195 |
246 } |
246 } |
247 |
247 |
248 /** |
248 /** |
249 * Flushes the stream. |
249 * Flushes the stream. |
250 * |
250 * |
251 * @exception IOException If an I/O error occurs |
251 * @throws IOException If an I/O error occurs |
252 */ |
252 */ |
253 public void flush() throws IOException { |
253 public void flush() throws IOException { |
254 se.flush(); |
254 se.flush(); |
255 } |
255 } |
256 |
256 |