Interface ResourceCreator
-
- All Known Implementing Classes:
DirectoryResourceCreator,FileResourceCreator,MapResourceCreator
public interface ResourceCreatorOpens a resource, characterized by a name, for writing.There also exists a concept
ResourceFinderthat findsResources for reading.- See Also:
ResourceFinder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.OutputStreamcreateResource(java.lang.String resourceName)Creates the designated resource.booleandeleteResource(java.lang.String resourceName)Deletes the resource with the given name.
-
-
-
Method Detail
-
createResource
java.io.OutputStream createResource(java.lang.String resourceName) throws java.io.IOExceptionCreates the designated resource.- Parameters:
resourceName- Designates the resource; typically structured by slashes ("/") like "com/foo/pkg/Bar.class"- Returns:
- Bytes written to this
OutputStreamare stored in the resource - Throws:
java.io.IOException- Problems creating the resource
-
deleteResource
boolean deleteResource(java.lang.String resourceName)
Deletes the resource with the given name.- Returns:
falseif the resource could not be deleted
-
-