Here you can find the source of writeString(String content, Path path)
public static Path writeString(String content, Path path)
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; public class Main { public static Path writeString(String content, Path path) { try {//from ww w . jav a 2s. co m Files.write(path, content.getBytes()); return path; } catch (IOException e) { throw new RuntimeException(e); } } }