Returns a new {@link CharSink} for writing character data to the given file using the given character set. The given {@code modes} control how the file is opened for writing. When no mode is provided, the file will be truncated before writing. When the {@link FileWriteMode#APPEND APPEND} mode is pro
(File file, Charset charset, FileWriteMode... modes)
| 219 | * @since 14.0 |
| 220 | */ |
| 221 | public static CharSink asCharSink(File file, Charset charset, FileWriteMode... modes) { |
| 222 | return asByteSink(file, modes).asCharSink(charset); |
| 223 | } |
| 224 | |
| 225 | /** |
| 226 | * Reads all bytes from a file into a byte array. |