Java Text File Write by Charset write(Path path, Iterable lines, Charset cs, OpenOption... options)

Here you can find the source of write(Path path, Iterable lines, Charset cs, OpenOption... options)

Description

write

License

Open Source License

Declaration

public static Path write(Path path,
            Iterable<? extends CharSequence> lines, Charset cs,
            OpenOption... options) throws IOException 

Method Source Code

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

import java.io.IOException;

import java.nio.charset.Charset;

import java.nio.file.Files;
import java.nio.file.OpenOption;
import java.nio.file.Path;

public class Main {
    public static Path write(Path path, byte[] bytes, OpenOption... options)
            throws IOException {
        return Files.write(path, bytes, options);
    }/*from www.  j av a2  s .co m*/

    public static Path write(Path path,
            Iterable<? extends CharSequence> lines, Charset cs,
            OpenOption... options) throws IOException {
        return Files.write(path, lines, cs, options);
    }
}

Related

  1. write(char[] data, File file, String charsetName)
  2. write(File file, Charset charset, String content)
  3. write(File file, Object content, Charset cs, boolean append)
  4. write(final String s, final OutputStream out, Charset charset)
  5. write(Path file, CharBuffer data, Charset cs)
  6. write(Path path, Iterable lines, Charset cs, OpenOption... options)
  7. write(String toWrite, File file, Charset charset)
  8. writeAll(Path path, String data, Charset cs)
  9. writeAll(String data, OutputStream outputStream, Charset charset)