Top Description Fields Constructors Methods
org.codehaus.commons.compiler.util.resource

public Class FileResource

extends Object
implements LocatableResource
Class Inheritance
All Implemented Interfaces
org.codehaus.commons.compiler.util.resource.LocatableResource, org.codehaus.commons.compiler.util.resource.Resource
Imports
java.io.File, .FileInputStream, .IOException, .InputStream, java.net.URL

Representation of a resource that is a java.io.File.

Field Summary

Modifier and TypeField and Description
private final File

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final File

Returns:

The file containing the contents of this resource
getFile
()

public final String
getFileName()

Implements org.codehaus.commons.compiler.util.resource.Resource.getFileName.

Returns a decorative "file name" that can be used for reporting errors and the like.
public URL
public final long
lastModified()

Implements org.codehaus.commons.compiler.util.resource.Resource.lastModified.

Returns the time of the last modification, in milliseconds since 1970, or 0L if the time of the last modification cannot be determined.
public final InputStream
public final String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

fileback to summary
private final File file

Constructor Detail

FileResourceback to summary
public FileResource(File file)

Method Detail

getFileback to summary
public final File getFile()
Returns:File

The file containing the contents of this resource

getFileNameback to summary
public final String getFileName()

Implements org.codehaus.commons.compiler.util.resource.Resource.getFileName.

Doc from org.codehaus.commons.compiler.util.resource.Resource.getFileName.

Returns a decorative "file name" that can be used for reporting errors and the like. It does not necessarily map to a file in the local file system!

Annotations
@Override
getLocationback to summary
public URL getLocation() throws IOException

Implements org.codehaus.commons.compiler.util.resource.LocatableResource.getLocation.

Returns:URL

Doc from org.codehaus.commons.compiler.util.resource.LocatableResource.getLocation.

A locator that addresses this resource's contents

Annotations
@Override
lastModifiedback to summary
public final long lastModified()

Implements org.codehaus.commons.compiler.util.resource.Resource.lastModified.

Doc from org.codehaus.commons.compiler.util.resource.Resource.lastModified.

Returns the time of the last modification, in milliseconds since 1970, or 0L if the time of the last modification cannot be determined.

Annotations
@Override
openback to summary
public final InputStream open() throws IOException

Implements org.codehaus.commons.compiler.util.resource.Resource.open.

Doc from org.codehaus.commons.compiler.util.resource.Resource.open.

Opens the resource. The caller is responsible for closing the java.io.InputStream.

Annotations
@Override
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override