Package io.avaje.classpath.scanner
Interface Resource
-
public interface Resource
A loadable resource.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetFilename()Return the filename of this resource, without the path.StringgetLocation()Return the location of the resource on the classpath (path and filename).StringgetLocationOnDisk()Return the location of this resource on disk.byte[]loadAsBytes()Return the context of this resource as a byte array.StringloadAsString(String encoding)Return the content of this resource as a string.
-
-
-
Method Detail
-
getLocation
String getLocation()
Return the location of the resource on the classpath (path and filename).
-
getLocationOnDisk
String getLocationOnDisk()
Return the location of this resource on disk.
-
loadAsString
String loadAsString(String encoding)
Return the content of this resource as a string.- Parameters:
encoding- The encoding to use.- Returns:
- The string contents of the resource.
-
loadAsBytes
byte[] loadAsBytes()
Return the context of this resource as a byte array.
-
getFilename
String getFilename()
Return the filename of this resource, without the path.
-
-