本文整理了Java中org.assertj.core.util.Files.linesOf()
方法的一些代码示例,展示了Files.linesOf()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Files.linesOf()
方法的具体详情如下:
包路径:org.assertj.core.util.Files
类名称:Files
方法名:linesOf
[英]Loads the text content of a file into a list of strings, each string corresponding to a line. The line endings are either \n, \r or \r\n.
[中]将文件的文本内容加载到字符串列表中,每个字符串对应一行。行尾为\n\r或\r\n。
代码示例来源:origin: org.assertj/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line. The line endings are
* either \n, \r or \r\n.
*
* @param file the file.
* @param charsetName the name of the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, String charsetName) {
return Files.linesOf(file, charsetName);
}
代码示例来源:origin: org.assertj/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line. The line endings are
* either \n, \r or \r\n.
*
* @param file the file.
* @param charsetName the name of the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, String charsetName) {
return Files.linesOf(file, charsetName);
}
代码示例来源:origin: org.assertj/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line. The line endings are
* either \n, \r or \r\n.
*
* @param file the file.
* @param charsetName the name of the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, String charsetName) {
return Files.linesOf(file, charsetName);
}
代码示例来源:origin: org.assertj/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line.
* The line endings are either \n, \r or \r\n.
*
* @param file the file.
* @param charset the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, Charset charset) {
return Files.linesOf(file, charset);
}
代码示例来源:origin: org.assertj/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line.
* The line endings are either \n, \r or \r\n.
*
* @param file the file.
* @param charset the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, Charset charset) {
return Files.linesOf(file, charset);
}
代码示例来源:origin: org.assertj/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line.
* The line endings are either \n, \r or \r\n.
*
* @param file the file.
* @param charset the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, Charset charset) {
return Files.linesOf(file, charset);
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line. The line endings are
* either \n, \r or \r\n.
*
* @param file the file.
* @param charsetName the name of the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, String charsetName) {
return Files.linesOf(file, charsetName);
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line.
* The line endings are either \n, \r or \r\n.
*
* @param file the file.
* @param charset the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, Charset charset) {
return Files.linesOf(file, charset);
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line.
* The line endings are either \n, \r or \r\n.
*
* @param file the file.
* @param charset the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, Charset charset) {
return Files.linesOf(file, charset);
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line. The line endings are
* either \n, \r or \r\n.
*
* @param file the file.
* @param charsetName the name of the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, String charsetName) {
return Files.linesOf(file, charsetName);
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line.
* The line endings are either \n, \r or \r\n.
*
* @param file the file.
* @param charset the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, Charset charset) {
return Files.linesOf(file, charset);
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line. The line endings are
* either \n, \r or \r\n.
*
* @param file the file.
* @param charsetName the name of the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, String charsetName) {
return Files.linesOf(file, charsetName);
}
代码示例来源:origin: org.assertj/assertj-core
/**
* Loads the text content of a file into a list of strings with the default charset, each string corresponding to a
* line.
* The line endings are either \n, \r or \r\n.
*
* @param file the file.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file) {
return Files.linesOf(file, Charset.defaultCharset());
}
代码示例来源:origin: org.assertj/assertj-core
/**
* Loads the text content of a file into a list of strings with the default charset, each string corresponding to a
* line.
* The line endings are either \n, \r or \r\n.
*
* @param file the file.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file) {
return Files.linesOf(file, Charset.defaultCharset());
}
代码示例来源:origin: org.assertj/assertj-core
/**
* Loads the text content of a file into a list of strings with the default charset, each string corresponding to a
* line.
* The line endings are either \n, \r or \r\n.
*
* @param file the file.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file) {
return Files.linesOf(file, Charset.defaultCharset());
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Loads the text content of a file into a list of strings with the default charset, each string corresponding to a
* line.
* The line endings are either \n, \r or \r\n.
*
* @param file the file.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file) {
return Files.linesOf(file, Charset.defaultCharset());
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Loads the text content of a file into a list of strings with the default charset, each string corresponding to a
* line.
* The line endings are either \n, \r or \r\n.
*
* @param file the file.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file) {
return Files.linesOf(file, Charset.defaultCharset());
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Loads the text content of a file into a list of strings with the default charset, each string corresponding to a
* line.
* The line endings are either \n, \r or \r\n.
*
* @param file the file.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file) {
return Files.linesOf(file, Charset.defaultCharset());
}
代码示例来源:origin: org.assertj/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line. The line endings are
* either \n, \r or \r\n.
*
* @param file the file.
* @param charsetName the name of the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, String charsetName) {
checkArgumentCharsetIsSupported(charsetName);
return linesOf(file, Charset.forName(charsetName));
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Loads the text content of a file into a list of strings, each string corresponding to a line. The line endings are
* either \n, \r or \r\n.
*
* @param file the file.
* @param charsetName the name of the character set to use.
* @return the content of the file.
* @throws NullPointerException if the given charset is {@code null}.
* @throws UncheckedIOException if an I/O exception occurs.
*/
public static List<String> linesOf(File file, String charsetName) {
checkArgumentCharsetIsSupported(charsetName);
return linesOf(file, Charset.forName(charsetName));
}
内容来源于网络,如有侵权,请联系作者删除!