Java Path File Write nio writeLines(Path path, T... a)

Here you can find the source of writeLines(Path path, T... a)

Description

write Lines

License

Apache License

Declaration

@SafeVarargs
    public static <T extends CharSequence> void writeLines(Path path, T... a) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.*;
import java.nio.charset.*;
import java.nio.file.*;

import java.util.*;

public class Main {
    @SafeVarargs
    public static <T extends CharSequence> void writeLines(Path path, T... a) throws IOException {
        Files.write(path, Arrays.asList(a), StandardCharsets.UTF_8);
    }/*  w w  w  .ja  v a 2 s  .com*/
}

Related

  1. writeFileToArchive(final ZipOutputStream zos, final Path baseSrcPath, final Path filePath)
  2. writeFully(Path filePath, byte[] bytes)
  3. writeJaasConfig(File krbDir, String princ, String keytabPath)
  4. writeJson(Object data, Path path)
  5. writeLastReadDate(String sinceDate, Path sinceFile)
  6. writeLineS(String filePath, String msg, int line)
  7. writeOrAppendLinesToFile(boolean append, Path filePath, String... lines)
  8. writeOutputToFile(Path path)
  9. writeString(Path path, String str)