io.quarkiverse.helm.deployment.utils.FileUtils Maven / Gradle / Ivy
package io.quarkiverse.helm.deployment.utils;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public final class FileUtils {
private FileUtils() {
}
public static String[] lines(File file) throws IOException {
List lines = new ArrayList<>();
try (FileInputStream is = new FileInputStream(file);
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr)) {
String line;
while ((line = br.readLine()) != null) {
lines.add(line);
}
}
return lines.toArray(new String[0]);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy