org.codehaus.janino.util.resource

Interface ResourceCreator

public interface ResourceCreator

Opens a resource, characterized by a name, for writing.

There also exists a concept ResourceFinder that finds Resources for reading.

See Also: ResourceFinder

Method Summary
abstract OutputStreamcreateResource(String resourceName)
Create the designated resource.
abstract booleandeleteResource(String resourceName)
Deletes the resource with the given name.

Method Detail

createResource

public abstract OutputStream createResource(String resourceName)
Create 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

public abstract boolean deleteResource(String resourceName)
Deletes the resource with the given name.

Returns: false if the resource could not be deleted