Package org.assertj.core.util
Class Paths
java.lang.Object
org.assertj.core.util.Paths
Utility methods related to
Paths.- Since:
- 3.23.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcheckArgumentCharsetIsSupported(String charsetName) Loads the text content of a file at a given path into a list of strings, each string corresponding to a line.Loads the text content of a file at a given path into a list of strings, each string corresponding to a line.
-
Constructor Details
-
Paths
private Paths()
-
-
Method Details
-
linesOf
Loads the text content of a file at a given path into a list of strings, each string corresponding to a line. The line endings are either \n, \r or \r\n.- Parameters:
path- the path.charset- the character set to use.- Returns:
- the content of the file at the given path.
- Throws:
NullPointerException- if the given charset isnull.UncheckedIOException- if an I/O exception occurs.
-
linesOf
Loads the text content of a file at a given path into a list of strings, each string corresponding to a line. The line endings are either \n, \r or \r\n.- Parameters:
path- the path.charsetName- the name of the character set to use.- Returns:
- the content of the file at the given path.
- Throws:
NullPointerException- if the given charset isnull.UncheckedIOException- if an I/O exception occurs.
-
checkArgumentCharsetIsSupported
-