...
Code Block | ||
---|---|---|
| ||
FileInputStream stream = null; BufferedReader bufRead = null; String line; try { stream = new FileInputStream(fileName); bufFread = new BufferedReader(stream); while((line=bufRead.readLine())!=null) { sendLine(line); } } catch (IOException e) { } catch {FileNotFoundException e) { } finally { try { if(bufRead != null) { bufRead.close(); } } finally { if(stream != null) { stream.close(); } } } |
Risk Assessment
Acquiring non-memory system resources and not releasing them explicitly might lead to resource exhaustion.
...