
public class ZipFileResource extends AbstractResource
| Constructor and Description |
|---|
ZipFileResource(ZipFileClassPathEntry classPathEntry,
String entryName)
Constructs a ZipFileResource from a jar class path entry and a zip entry name.
|
ZipFileResource(ZipFile zipFile,
String filePath,
long lastModified,
String entryName)
Constructs a ZipFileResource from a zip file and entry name.
File path and modification time stamp parameters may seem redundant but are necessary because ZipFile can not provide them. |
| Modifier and Type | Method and Description |
|---|---|
ZipFileClassPathEntry |
getClassPathEntry()
Accesses the path root under which this resource was found.
|
long |
getLastModified()
Returns the last modified time of the compilation unit.
|
String |
getLocation()
Returns the URL-like location of the resource.
|
String |
getPath()
Returns the full abstract path of the resource.
|
String[] |
getPathParts()
Returns the components of
getPath(). |
InputStream |
openContents()
Returns the contents of the resource.
|
wasRerootedpublic ZipFileResource(ZipFile zipFile, String filePath, long lastModified, String entryName)
public ZipFileResource(ZipFileClassPathEntry classPathEntry, String entryName)
public ZipFileClassPathEntry getClassPathEntry()
AbstractResourcegetClassPathEntry in class AbstractResourcepublic long getLastModified()
ResourcegetLastModified in class Resourcepublic String getLocation()
ResourcegetLocation in class Resourcepublic String getPath()
Resourcepublic InputStream openContents() throws IOException
ResourceopenContents in class ResourceIOExceptionCopyright © 2018. All rights reserved.