Overwrites a file with the contents of a byte array. <p><b>{@link java.nio.file.Path} equivalent:</b> {@link java.nio.file.Files#write(java.nio.file.Path, byte[], java.nio.file.OpenOption...)}. @param from the bytes to write @param to the destination file @throws IOException if an I/O error occurs
(byte[] from, File to)
| 266 | * @throws IOException if an I/O error occurs |
| 267 | */ |
| 268 | public static void write(byte[] from, File to) throws IOException { |
| 269 | asByteSink(to).write(from); |
| 270 | } |
| 271 | |
| 272 | /** |
| 273 | * Writes a character sequence (such as a string) to a file using the given character set. |