| Modifier and Type | Method and Description |
|---|---|
static List<String> |
linesOf(Path path,
Charset charset)
Loads the text content of a file at a given path into a list of strings, each string corresponding to a line.
|
static List<String> |
linesOf(Path path,
String charsetName)
Loads the text content of a file at a given path into a list of strings, each string corresponding to a line.
|
public static List<String> linesOf(Path path, Charset charset)
path - the path.charset - the character set to use.NullPointerException - if the given charset is null.UncheckedIOException - if an I/O exception occurs.public static List<String> linesOf(Path path, String charsetName)
path - the path.charsetName - the name of the character set to use.NullPointerException - if the given charset is null.UncheckedIOException - if an I/O exception occurs.Copyright © 2025. All rights reserved.