org.assertj.core.util.Files.linesOf()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(9.6k)|赞(0)|评价(0)|浏览(160)

本文整理了Java中org.assertj.core.util.Files.linesOf()方法的一些代码示例,展示了Files.linesOf()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Files.linesOf()方法的具体详情如下:
包路径:org.assertj.core.util.Files
类名称:Files
方法名:linesOf

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));
}

相关文章