Creates a BufferedReader object that can be used to read files line-by-line as individual String objects. This is the complement to the createWriter() function. For more information about the BufferedReader class and its methods like readLine() and close use
(String filename)
| 6130 | * @see PrintWriter |
| 6131 | */ |
| 6132 | public BufferedReader createReader(String filename) { |
| 6133 | InputStream is = createInput(filename); |
| 6134 | if (is == null) { |
| 6135 | System.err.println("The file \"" + filename + "\" " + |
| 6136 | "is missing or inaccessible, make sure " + |
| 6137 | "the URL is valid or that the file has been " + |
| 6138 | "added to your sketch and is readable."); |
| 6139 | return null; |
| 6140 | } |
| 6141 | return createReader(is); |
| 6142 | } |
| 6143 | |
| 6144 | |
| 6145 | /** |
no test coverage detected