Skip to content

Commit d5e24a4

Browse files
committed
removed lots of finals
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/io/trunk@140456 13f79535-47bb-0310-9956-ffa450edef68
1 parent a330996 commit d5e24a4

6 files changed

Lines changed: 254 additions & 254 deletions

File tree

src/java/org/apache/commons/io/CopyUtils.java

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
* @author Peter Donald
7070
* @author Jeff Turner
7171
* @author Matthew Hawthorne
72-
* @version $Id: CopyUtils.java,v 1.2 2003/10/13 07:04:52 rdonkin Exp $
72+
* @version $Id: CopyUtils.java,v 1.3 2003/12/30 06:52:49 bayard Exp $
7373
*/
7474
public class CopyUtils {
7575

@@ -93,7 +93,7 @@ public CopyUtils() {}
9393
* @param output the <code>OutputStream</code> to write to
9494
* @throws IOException In case of an I/O problem
9595
*/
96-
public static void copy(final byte[] input, final OutputStream output)
96+
public static void copy(byte[] input, OutputStream output)
9797
throws IOException {
9898
copy(input, output, DEFAULT_BUFFER_SIZE);
9999
}
@@ -106,8 +106,8 @@ public static void copy(final byte[] input, final OutputStream output)
106106
* @throws IOException In case of an I/O problem
107107
*/
108108
public static void copy(
109-
final byte[] input,
110-
final OutputStream output,
109+
byte[] input,
110+
OutputStream output,
111111
int bufferSize)
112112
throws IOException {
113113
// TODO Is bufferSize param needed?
@@ -126,7 +126,7 @@ public static void copy(
126126
* @param output the <code>Writer</code> to write to
127127
* @throws IOException In case of an I/O problem
128128
*/
129-
public static void copy(final byte[] input, final Writer output)
129+
public static void copy(byte[] input, Writer output)
130130
throws IOException {
131131
copy(input, output, DEFAULT_BUFFER_SIZE);
132132
}
@@ -141,11 +141,11 @@ public static void copy(final byte[] input, final Writer output)
141141
* @throws IOException In case of an I/O problem
142142
*/
143143
public static void copy(
144-
final byte[] input,
145-
final Writer output,
146-
final int bufferSize)
144+
byte[] input,
145+
Writer output,
146+
int bufferSize)
147147
throws IOException {
148-
final ByteArrayInputStream in = new ByteArrayInputStream(input);
148+
ByteArrayInputStream in = new ByteArrayInputStream(input);
149149
copy(in, output, bufferSize);
150150
}
151151

@@ -160,11 +160,11 @@ public static void copy(
160160
* @throws IOException In case of an I/O problem
161161
*/
162162
public static void copy(
163-
final byte[] input,
164-
final Writer output,
165-
final String encoding)
163+
byte[] input,
164+
Writer output,
165+
String encoding)
166166
throws IOException {
167-
final ByteArrayInputStream in = new ByteArrayInputStream(input);
167+
ByteArrayInputStream in = new ByteArrayInputStream(input);
168168
copy(in, output, encoding);
169169
}
170170

@@ -180,12 +180,12 @@ public static void copy(
180180
* @throws IOException In case of an I/O problem
181181
*/
182182
public static void copy(
183-
final byte[] input,
184-
final Writer output,
185-
final String encoding,
186-
final int bufferSize)
183+
byte[] input,
184+
Writer output,
185+
String encoding,
186+
int bufferSize)
187187
throws IOException {
188-
final ByteArrayInputStream in = new ByteArrayInputStream(input);
188+
ByteArrayInputStream in = new ByteArrayInputStream(input);
189189
copy(in, output, encoding, bufferSize);
190190
}
191191

@@ -200,7 +200,7 @@ public static void copy(
200200
* @return the number of bytes copied
201201
* @throws IOException In case of an I/O problem
202202
*/
203-
public static int copy(final InputStream input, final OutputStream output)
203+
public static int copy(InputStream input, OutputStream output)
204204
throws IOException {
205205
return copy(input, output, DEFAULT_BUFFER_SIZE);
206206
}
@@ -214,11 +214,11 @@ public static int copy(final InputStream input, final OutputStream output)
214214
* @throws IOException In case of an I/O problem
215215
*/
216216
public static int copy(
217-
final InputStream input,
218-
final OutputStream output,
219-
final int bufferSize)
217+
InputStream input,
218+
OutputStream output,
219+
int bufferSize)
220220
throws IOException {
221-
final byte[] buffer = new byte[bufferSize];
221+
byte[] buffer = new byte[bufferSize];
222222
int count = 0;
223223
int n = 0;
224224
while (-1 != (n = input.read(buffer))) {
@@ -239,7 +239,7 @@ public static int copy(
239239
* @return the number of characters copied
240240
* @throws IOException In case of an I/O problem
241241
*/
242-
public static int copy(final Reader input, final Writer output)
242+
public static int copy(Reader input, Writer output)
243243
throws IOException {
244244
return copy(input, output, DEFAULT_BUFFER_SIZE);
245245
}
@@ -253,11 +253,11 @@ public static int copy(final Reader input, final Writer output)
253253
* @throws IOException In case of an I/O problem
254254
*/
255255
public static int copy(
256-
final Reader input,
257-
final Writer output,
258-
final int bufferSize)
256+
Reader input,
257+
Writer output,
258+
int bufferSize)
259259
throws IOException {
260-
final char[] buffer = new char[bufferSize];
260+
char[] buffer = new char[bufferSize];
261261
int count = 0;
262262
int n = 0;
263263
while (-1 != (n = input.read(buffer))) {
@@ -279,7 +279,7 @@ public static int copy(
279279
* @param output the <code>Writer</code> to write to
280280
* @throws IOException In case of an I/O problem
281281
*/
282-
public static void copy(final InputStream input, final Writer output)
282+
public static void copy(InputStream input, Writer output)
283283
throws IOException {
284284
copy(input, output, DEFAULT_BUFFER_SIZE);
285285
}
@@ -294,11 +294,11 @@ public static void copy(final InputStream input, final Writer output)
294294
* @throws IOException In case of an I/O problem
295295
*/
296296
public static void copy(
297-
final InputStream input,
298-
final Writer output,
299-
final int bufferSize)
297+
InputStream input,
298+
Writer output,
299+
int bufferSize)
300300
throws IOException {
301-
final InputStreamReader in = new InputStreamReader(input);
301+
InputStreamReader in = new InputStreamReader(input);
302302
copy(in, output, bufferSize);
303303
}
304304

@@ -313,11 +313,11 @@ public static void copy(
313313
* @throws IOException In case of an I/O problem
314314
*/
315315
public static void copy(
316-
final InputStream input,
317-
final Writer output,
318-
final String encoding)
316+
InputStream input,
317+
Writer output,
318+
String encoding)
319319
throws IOException {
320-
final InputStreamReader in = new InputStreamReader(input, encoding);
320+
InputStreamReader in = new InputStreamReader(input, encoding);
321321
copy(in, output);
322322
}
323323

@@ -333,12 +333,12 @@ public static void copy(
333333
* @throws IOException In case of an I/O problem
334334
*/
335335
public static void copy(
336-
final InputStream input,
337-
final Writer output,
338-
final String encoding,
339-
final int bufferSize)
336+
InputStream input,
337+
Writer output,
338+
String encoding,
339+
int bufferSize)
340340
throws IOException {
341-
final InputStreamReader in = new InputStreamReader(input, encoding);
341+
InputStreamReader in = new InputStreamReader(input, encoding);
342342
copy(in, output, bufferSize);
343343
}
344344

@@ -353,7 +353,7 @@ public static void copy(
353353
* @param output the <code>OutputStream</code> to write to
354354
* @throws IOException In case of an I/O problem
355355
*/
356-
public static void copy(final Reader input, final OutputStream output)
356+
public static void copy(Reader input, OutputStream output)
357357
throws IOException {
358358
copy(input, output, DEFAULT_BUFFER_SIZE);
359359
}
@@ -367,11 +367,11 @@ public static void copy(final Reader input, final OutputStream output)
367367
* @throws IOException In case of an I/O problem
368368
*/
369369
public static void copy(
370-
final Reader input,
371-
final OutputStream output,
372-
final int bufferSize)
370+
Reader input,
371+
OutputStream output,
372+
int bufferSize)
373373
throws IOException {
374-
final OutputStreamWriter out = new OutputStreamWriter(output);
374+
OutputStreamWriter out = new OutputStreamWriter(output);
375375
copy(input, out, bufferSize);
376376
// XXX Unless anyone is planning on rewriting OutputStreamWriter, we have to flush here.
377377
out.flush();
@@ -388,7 +388,7 @@ public static void copy(
388388
* @param output the <code>OutputStream</code> to write to
389389
* @throws IOException In case of an I/O problem
390390
*/
391-
public static void copy(final String input, final OutputStream output)
391+
public static void copy(String input, OutputStream output)
392392
throws IOException {
393393
copy(input, output, DEFAULT_BUFFER_SIZE);
394394
}
@@ -402,12 +402,12 @@ public static void copy(final String input, final OutputStream output)
402402
* @throws IOException In case of an I/O problem
403403
*/
404404
public static void copy(
405-
final String input,
406-
final OutputStream output,
407-
final int bufferSize)
405+
String input,
406+
OutputStream output,
407+
int bufferSize)
408408
throws IOException {
409-
final StringReader in = new StringReader(input);
410-
final OutputStreamWriter out = new OutputStreamWriter(output);
409+
StringReader in = new StringReader(input);
410+
OutputStreamWriter out = new OutputStreamWriter(output);
411411
copy(in, out, bufferSize);
412412
// XXX Unless anyone is planning on rewriting OutputStreamWriter, we have to flush here.
413413
out.flush();
@@ -423,7 +423,7 @@ public static void copy(
423423
* @param output the <code>Writer</code> to write to
424424
* @throws IOException In case of an I/O problem
425425
*/
426-
public static void copy(final String input, final Writer output)
426+
public static void copy(String input, Writer output)
427427
throws IOException {
428428
output.write(input);
429429
}

0 commit comments

Comments
 (0)