mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
12 lines
298 B
Java
12 lines
298 B
Java
import java.io.*;
|
|||
|
|||
public class FileStreamLeak {
|
|||
public String readData(String path) throws IOException {
|
|||
FileInputStream fis = new FileInputStream(path);
|
|||
byte[] data = new byte[1024];
|
|||
fis.read(data);
|
|||
return new String(data);
|
|||
// fis never closed
|
|||
}
|
|||
}
|