Package com.iizix.jetty
Class WSJarResourceFile
java.lang.Object
com.iizix.jetty.WSJarResourceFile
The Resource for Jetty that refers to a JarEntry of file type inside an XJar or MemoryJar.
Constructor Summary
ConstructorDescriptionWSJarResourceFile
(IJarFile jarFile, JarEntry jarEntry, long lastModified, URL url) Constructs the resource for the Jar file in question and the file entry.Method Summary
Constructor Details
WSJarResourceFile
Constructs the resource for the Jar file in question and the file entry.- Parameters:
jarFile
- The Jar file.jarEntry
- The Jar Entry.lastModified
- Last modified time in milliseconds since Epoch.url
- The URL.- Throws:
IllegalArgumentException
- IfjarEntry
is not of File type, i.e. is a directory.NullPointerException
- If eitherjarFile
orjarEntry
isnull
.
Method Details
getData
public byte[] getData()Gets the data of the resource.- Returns:
- The data (cloned).
getURI
Gets the URI of the resource.- Returns:
- The URI.
toString
Constructs a string representation of this object.newResource
Creates a new resource from this in-memory file resource.- Returns:
- The new resource.