Package org.codehaus.commons.compiler.util.resource

# Class FileResourceCreator

java.lang.Object
org.codehaus.commons.compiler.util.resource.FileResourceCreator

All Implemented Interfaces:
  `ResourceCreator`

Direct Known Subclasses:
  `DirectoryResourceCreator`

public abstract class FileResourceCreator extends Object implements ResourceCreator
Stores a stream of bytes in a named resource.

## Constructor Summary

Constructors
Constructor
Description
`FileResourceCreator()`

## Method Summary

Modifier and Type
Method
Description
`final OutputStream`
`createResource(String resourceName)`
Creates the designated resource.
`final boolean`
`deleteResource(String resourceName)`
Deletes the resource with the given name.
`protected abstract File`
`getFile(String resourceName)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### FileResourceCreator

public FileResourceCreator()

## Method Details

### createResource

public final OutputStream createResource(String resourceName) throws IOException
Description copied from interface: `ResourceCreator`
Creates the designated resource.

Specified by:
  `createResource` in interface `ResourceCreator`
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 final boolean deleteResource(String resourceName)
Description copied from interface: `ResourceCreator`
Deletes the resource with the given name.

Specified by:
  `deleteResource` in interface `ResourceCreator`
Returns:
  `false` if the resource could not be deleted

### getFile

protected abstract File getFile(String resourceName)

Returns:
  The file into which the contents is written