mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-25 02:21:17 +07:00
12 lines
300 B
Java
12 lines
300 B
Java
// "Replace with 'Files.newInputStream()'" "true-preview"
|
|
import java.io.*;
|
|
import java.nio.file.Files;
|
|
|
|
class Foo {
|
|
void test(File file) {
|
|
try (InputStream is = new BufferedInputStream(Files.newInputStream(file.toPath()))) {
|
|
} catch (IOException e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
} |