Package org.tentackle.buildsupport
Class ResourceManager
java.lang.Object
org.tentackle.buildsupport.ResourceManager
A manager for resources.
- Author:
- harald
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes all resources.booleanReturns whether given resource file exists.Gets the resource location.Gets the reader.Gets the resource names.Gets the writer.
-
Constructor Details
-
ResourceManager
Creates a resource manager.- Parameters:
location- the resource location
-
-
Method Details
-
getResourceNames
Gets the resource names.- Returns:
- the names, never null
-
getLocation
Gets the resource location.- Returns:
- the location
-
getWriter
Gets the writer.- Parameters:
name- the writer's name- Returns:
- the writer
- Throws:
IOException- if writer could not be created
-
getReader
Gets the reader.- Parameters:
name- the reader's name- Returns:
- the reader
- Throws:
IOException- if reader could not be created
-
exists
Returns whether given resource file exists.- Parameters:
name- the file;s name- Returns:
- true if exists
-
close
Closes all resources.- Throws:
IOException- if closing a resource failed
-