public class JarResource extends FileResource
file| Constructor and Description |
|---|
JarResource(File file) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected URL |
createEntryURL(ZipEntry zipEntry) |
protected void |
finalize() |
Iterator<String> |
getAllEntries()
Returns all the path entries of the jar.
|
Iterator<String> |
getAllEntriesIncludingFolders()
Returns all the path entries of the jar including the folders.
|
List<URL> |
getEntry(String path)
Return the URL of the resource path.
|
byte[] |
getEntryBytes(String path)
Return the content of the resource path.
|
URL |
getEntryRoot(String path)
Return the URL of the resource path.
|
ZipFile |
getZipFile() |
getFile, getFilename, getFileURL, toStringcreateResource, readBytespublic JarResource(File file)
protected void finalize()
throws Throwable
public ZipFile getZipFile()
public void close()
public Iterator<String> getAllEntries() throws Exception
getAllEntries in class FileResourceExceptionpublic Iterator<String> getAllEntriesIncludingFolders() throws Exception
getAllEntriesIncludingFolders in class FileResourceExceptionpublic List<URL> getEntry(String path) throws Exception
getEntry in class FileResourcepath - the entry pathExceptionpublic byte[] getEntryBytes(String path) throws Exception
getEntryBytes in class FileResourcepath - the entry pathExceptionpublic URL getEntryRoot(String path) throws Exception
getEntryRoot in class FileResourcepath - the entry pathExceptionprotected URL createEntryURL(ZipEntry zipEntry) throws MalformedURLException
MalformedURLExceptionCopyright © 2016. All rights reserved.