EasyBeans is an open source implementation by ObjectWeb of the EJB3 container specification. 
X Wiki
  History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: UTIL-55
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Guillaume Sauthier
Reporter: Guillaume Sauthier
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OW2 Util

FileUtils should provide convenience close() and flush() methods

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


 Description  « Hide
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 ?

 All   Comments   Change History   Related Builds      Sort Order:
Guillaume Sauthier - 13/Aug/09 02:02 PM
Added in trunk


Copyright © 2006-2007 EasyBeans / ObjectWeb consortium

http://www.easybeans.org