EasyBeans is an open source implementation by ObjectWeb of the EJB3 container specification.

Project

Developer

Wiki

About

|
If you were logged in you would be able to see more operations.
|
|
|
OW2 Util
Created: 13/Aug/09 10:18 AM
Updated: 13/Aug/09 02:03 PM
|
|
| Component/s: |
None
|
| Affects Version/s: |
None
|
| Fix Version/s: |
OW2 Util 1.0.19
|
|
|
When closing or flushing a file, a stream, the same old actions are always done:
if (object != null) {
try {
object.close();
} catch {
// Ignored
}
}
Having a convenience method could simplify the code dealing with close and flush.
Proposed methods signatures:
FileUtils.close(Closeable... closeables);
FileUtils.close(Flusheable... flusheables);
WDYT ?
|
|
Description
|
When closing or flushing a file, a stream, the same old actions are always done:
if (object != null) {
try {
object.close();
} catch {
// Ignored
}
}
Having a convenience method could simplify the code dealing with close and flush.
Proposed methods signatures:
FileUtils.close(Closeable... closeables);
FileUtils.close(Flusheable... flusheables);
WDYT ? |
Show » |
|