Reads all characters from a file into a String, using the given character set. @param file the file to read from @param charset the charset used to decode the input stream; see StandardCharsets for helpful predefined constants @return a string containing all the characters from
(File file, Charset charset)
| 269 | |
| 270 | |
| 271 | public static String toString(File file, Charset charset) throws IOException { |
| 272 | return asCharSource(file, charset).read(); |
| 273 | } |
| 274 | |
| 275 | /** |
| 276 | * Overwrites a file with the contents of a byte array. |
nothing calls this directly
no test coverage detected