Class StringResource
- java.lang.Object
-
- org.codehaus.commons.compiler.util.resource.StringResource
-
-
Constructor Summary
Constructors Constructor Description StringResource(java.lang.String fileName, java.lang.String text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFileName()
Returns a decorative "file name" that can be used for reporting errors and the like.long
lastModified()
Returns the time of the last modification, in milliseconds since 1970, or0L
if the time of the last modification cannot be determined.java.io.InputStream
open()
Opens the resource.java.lang.String
toString()
-
-
-
Method Detail
-
getFileName
public final java.lang.String getFileName()
Description copied from interface:Resource
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!- Specified by:
getFileName
in interfaceResource
-
open
public final java.io.InputStream open()
Description copied from interface:Resource
Opens the resource. The caller is responsible for closing theInputStream
.
-
lastModified
public final long lastModified()
Description copied from interface:Resource
Returns the time of the last modification, in milliseconds since 1970, or0L
if the time of the last modification cannot be determined.- Specified by:
lastModified
in interfaceResource
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-