Class ConfigurationSource.Resource
java.lang.Object
org.apache.tomcat.util.file.ConfigurationSource.Resource
- All Implemented Interfaces:
AutoCloseable
- Enclosing interface:
ConfigurationSource
Represents a resource: a stream to the resource associated with its URI.
-
Constructor Summary
ConstructorsConstructorDescriptionResource(InputStream inputStream, URI uri) Creates a new resource with the given input stream and URI. -
Method Summary
-
Constructor Details
-
Resource
Creates a new resource with the given input stream and URI.- Parameters:
inputStream- the input stream for the resource contenturi- the URI identifying the resource location
-
-
Method Details
-
getInputStream
Returns the input stream for reading the resource content.- Returns:
- the input stream
-
getURI
Returns the URI that identifies the resource location.- Returns:
- the resource URI
-
getLastModified
Returns the last modified time of the resource in milliseconds since the epoch.- Returns:
- the last modified time in milliseconds
- Throws:
MalformedURLException- if the resource URI cannot be converted to a URLIOException- if an I/O error occurs while fetching the last modified time
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-