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

public Interface Resource

Known Direct Subinterfaces
org.codehaus.commons.compiler.util.resource.LocatableResource
Known Direct Implementers
org.codehaus.commons.compiler.util.resource.StringResource
Imports
java.io.IOException, .InputStream

A sequence of bytes that is identified by a "name", is typically found by a org.codehaus.commons.compiler.util.resource.ResourceFinder, can be open()ed for reading, and optionally has a lastModified() property.

There also exists a org.codehaus.commons.compiler.util.resource.ResourceCreator concept which opens a resource for writing, but that happens directly and not through an intermediate Resource object.

See Also
org.codehaus.commons.compiler.util.resource.ResourceFinder, org.codehaus.commons.compiler.util.resource.ResourceCreator

Method Summary

Modifier and TypeMethod and Description
public String
getFileName()

Returns a decorative "file name" that can be used for reporting errors and the like.

public long
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 InputStream
open()

Opens the resource.

Method Detail

getFileNameback to summary
public String 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!

lastModifiedback to summary
public long lastModified()

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

openback to summary
public InputStream open() throws IOException

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