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 |
59 } |
59 } |
60 |
60 |
61 /** |
61 /** |
62 * Creates a new CharArrayWriter with the specified initial size. |
62 * Creates a new CharArrayWriter with the specified initial size. |
63 * |
63 * |
64 * @param initialSize an int specifying the initial buffer size. |
64 * @param initialSize an int specifying the initial buffer size. |
65 * @exception IllegalArgumentException if initialSize is negative |
65 * @throws IllegalArgumentException if initialSize is negative |
66 */ |
66 */ |
67 public CharArrayWriter(int initialSize) { |
67 public CharArrayWriter(int initialSize) { |
68 if (initialSize < 0) { |
68 if (initialSize < 0) { |
69 throw new IllegalArgumentException("Negative initial size: " |
69 throw new IllegalArgumentException("Negative initial size: " |
70 + initialSize); |
70 + initialSize); |