jodd-core/src/main/java/jodd/io/PathUtil.java
public static String readString(final Path path) throws IOException {
		try (BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8)) {
			StringWriter writer = new StringWriter(); // flush & close not needed for StringWriter-instance
			StreamUtil.copy(reader, writer);
			return writer.toString();
		}
	}
public static String readString(final Path path) throws IOException {
		try (BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8)) {
			StringWriter writer = new StringWriter(); // flush & close not needed for StringWriter-instance
			StreamUtil.copy(reader, writer);
			return writer.toString();
		}
	}
public static String readString ( final Path path ) throws IOException { try ( BufferedReader reader = Files . newBufferedReader ( path , StandardCharsets . UTF_8 ) ) { StringWriter writer = new StringWriter ( ) ; // flush & close not needed for StringWriter-instance StreamUtil . copy ( reader , writer ) ; return writer . toString ( ) ; } }
Reads path content.
Reads path content .