Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 348190

Summary: Provide a utility method that closes a stream and handles the IOException
Product: [RT] RAP Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: 1.5 M3   
Hardware: All   
OS: All   
Whiteboard:

Description Rüdiger Herrmann CLA 2011-06-03 05:49:50 EDT
There are several places across the RWT code base where a stream is closed, the IOException is caught and turned into a runtime exception of some sort:
* ThemeManager
* ImageDataFactory
* ImageFactory
* InternalImageFactory
These code passages should be united in one place. One candiate would be the class StreamWritingUtil if it were renamed to something more general like StreamUtil, or IOUtil.
Comment 1 Rüdiger Herrmann CLA 2011-10-18 06:00:27 EDT
Renamed StreamWritingUtil to StreamUtil and introduced a close() method. If an IOException occues while closing an (input-)stream, it is wrapped into a RuntimeException and re-thrown.
Changes are in CVS HEAD.