1
1
/*
2
- * Copyright (c) 1996, 2019 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 1996, 2021 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
29
29
30
30
/**
31
31
* Reads text from character files using a default buffer size. Decoding from bytes
32
- * to characters uses either a specified {@linkplain java.nio.charset.Charset charset}
33
- * or the platform's
34
- * {@linkplain java.nio.charset.Charset#defaultCharset() default charset}.
32
+ * to characters uses either a specified {@linkplain Charset charset}
33
+ * or the {@linkplain Charset#defaultCharset() default charset}.
35
34
*
36
35
* <p>
37
36
* The {@code FileReader} is meant for reading streams of characters. For reading
38
37
* streams of raw bytes, consider using a {@code FileInputStream}.
39
38
*
40
39
* @see InputStreamReader
41
40
* @see FileInputStream
41
+ * @see Charset#defaultCharset()
42
42
*
43
43
* @author Mark Reinhold
44
44
* @since 1.1
@@ -47,51 +47,51 @@ public class FileReader extends InputStreamReader {
47
47
48
48
/**
49
49
* Creates a new {@code FileReader}, given the name of the file to read,
50
- * using the platform's
51
- * {@linkplain java.nio.charset.Charset#defaultCharset() default charset}.
50
+ * using the {@linkplain Charset#defaultCharset() default charset}.
52
51
*
53
52
* @param fileName the name of the file to read
54
53
* @throws FileNotFoundException if the named file does not exist,
55
54
* is a directory rather than a regular file,
56
55
* or for some other reason cannot be opened for
57
56
* reading.
57
+ * @see Charset#defaultCharset()
58
58
*/
59
59
public FileReader (String fileName ) throws FileNotFoundException {
60
60
super (new FileInputStream (fileName ));
61
61
}
62
62
63
63
/**
64
64
* Creates a new {@code FileReader}, given the {@code File} to read,
65
- * using the platform's
66
- * {@linkplain java.nio.charset.Charset#defaultCharset() default charset}.
65
+ * using the {@linkplain Charset#defaultCharset() default charset}.
67
66
*
68
67
* @param file the {@code File} to read
69
68
* @throws FileNotFoundException if the file does not exist,
70
69
* is a directory rather than a regular file,
71
70
* or for some other reason cannot be opened for
72
71
* reading.
72
+ * @see Charset#defaultCharset()
73
73
*/
74
74
public FileReader (File file ) throws FileNotFoundException {
75
75
super (new FileInputStream (file ));
76
76
}
77
77
78
78
/**
79
79
* Creates a new {@code FileReader}, given the {@code FileDescriptor} to read,
80
- * using the platform's
81
- * {@linkplain java.nio.charset.Charset#defaultCharset() default charset}.
80
+ * using the {@linkplain Charset#defaultCharset() default charset}.
82
81
*
83
82
* @param fd the {@code FileDescriptor} to read
83
+ * @see Charset#defaultCharset()
84
84
*/
85
85
public FileReader (FileDescriptor fd ) {
86
86
super (new FileInputStream (fd ));
87
87
}
88
88
89
89
/**
90
90
* Creates a new {@code FileReader}, given the name of the file to read
91
- * and the {@linkplain java.nio.charset. Charset charset}.
91
+ * and the {@linkplain Charset charset}.
92
92
*
93
93
* @param fileName the name of the file to read
94
- * @param charset the {@linkplain java.nio.charset. Charset charset}
94
+ * @param charset the {@linkplain Charset charset}
95
95
* @throws IOException if the named file does not exist,
96
96
* is a directory rather than a regular file,
97
97
* or for some other reason cannot be opened for
@@ -105,10 +105,10 @@ public FileReader(String fileName, Charset charset) throws IOException {
105
105
106
106
/**
107
107
* Creates a new {@code FileReader}, given the {@code File} to read and
108
- * the {@linkplain java.nio.charset. Charset charset}.
108
+ * the {@linkplain Charset charset}.
109
109
*
110
110
* @param file the {@code File} to read
111
- * @param charset the {@linkplain java.nio.charset. Charset charset}
111
+ * @param charset the {@linkplain Charset charset}
112
112
* @throws IOException if the file does not exist,
113
113
* is a directory rather than a regular file,
114
114
* or for some other reason cannot be opened for
0 commit comments