Class FileResourceCreator
java.lang.Object
org.codehaus.commons.compiler.util.resource.FileResourceCreator
- All Implemented Interfaces:
ResourceCreator
- Direct Known Subclasses:
DirectoryResourceCreator
Stores a stream of bytes in a named resource.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal OutputStream
createResource
(String resourceName) Creates the designated resource.final boolean
deleteResource
(String resourceName) Deletes the resource with the given name.protected abstract File
-
Constructor Details
-
FileResourceCreator
public FileResourceCreator()
-
-
Method Details
-
createResource
Description copied from interface:ResourceCreator
Creates the designated resource.- Specified by:
createResource
in interfaceResourceCreator
- 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
Description copied from interface:ResourceCreator
Deletes the resource with the given name.- Specified by:
deleteResource
in interfaceResourceCreator
- Returns:
false
if the resource could not be deleted
-
getFile
- Returns:
- The file into which the contents is written
-