Interface ResourceCreator
- All Known Implementing Classes:
DirectoryResourceCreator
,FileResourceCreator
,MapResourceCreator
public interface ResourceCreator
Opens a resource, characterized by a name, for writing.
There also exists a concept ResourceFinder
that finds Resource
s for reading.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateResource
(String resourceName) Creates the designated resource.boolean
deleteResource
(String resourceName) Deletes the resource with the given name.
-
Method Details
-
createResource
Creates the designated resource.- Parameters:
resourceName
- Designates the resource; typically structured by slashes ("/") like "com/foo/pkg/Bar.class
"- Returns:
- Bytes written to this
OutputStream
are stored in the resource - Throws:
IOException
- Problems creating the resource
-
deleteResource
Deletes the resource with the given name.- Returns:
false
if the resource could not be deleted
-