Package org.ringojs.repository
Class WebappResource
- java.lang.Object
-
- org.ringojs.repository.AbstractResource
-
- org.ringojs.repository.WebappResource
-
public class WebappResource extends AbstractResource
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.ringojs.repository.AbstractResource
baseName, name, path, repository
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WebappResource(jakarta.servlet.ServletContext context, WebappRepository repository, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
boolean
exists()
Checks wether this resource actually (still) existsjava.io.InputStream
getInputStream()
Returns an input stream to the content of the resourcelong
getLength()
Returns the length of the resource's contentjava.net.URL
getUrl()
Returns an url to the resource if the repository of this resource is able to provide urls.int
hashCode()
long
lastModified()
Returns the date the resource was last modifiedjava.lang.String
toString()
-
Methods inherited from class org.ringojs.repository.AbstractResource
getBaseName, getChecksum, getContent, getContent, getLineNumber, getModuleName, getName, getParentRepository, getPath, getReader, getReader, getRelativePath, getRootRepository, getStripShebang, isAbsolute, setAbsolute, setBaseNameFromName, setStripShebang, stripShebang
-
-
-
-
Constructor Detail
-
WebappResource
protected WebappResource(jakarta.servlet.ServletContext context, WebappRepository repository, java.lang.String name)
-
-
Method Detail
-
lastModified
public long lastModified()
Description copied from interface:Trackable
Returns the date the resource was last modified- Returns:
- last modified date
-
exists
public boolean exists() throws java.io.IOException
Description copied from interface:Trackable
Checks wether this resource actually (still) exists- Returns:
- true if the resource exists
- Throws:
java.io.IOException
-
getLength
public long getLength()
Description copied from interface:Resource
Returns the length of the resource's content- Returns:
- content length
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
Description copied from interface:Resource
Returns an input stream to the content of the resource- Returns:
- content input stream
- Throws:
java.io.IOException
- if a I/O related error occurs
-
getUrl
public java.net.URL getUrl() throws java.net.MalformedURLException
Description copied from interface:Trackable
Returns an url to the resource if the repository of this resource is able to provide urls.- Returns:
- url to the resource
- Throws:
java.net.MalformedURLException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-