类 JarFile
- java.lang.Object
 - java.util.zip.ZipFile
 - java.util.jar.JarFile
 - org.springframework.boot.loader.jar.JarFile
 
- 所有已实现的接口:
 Closeable,AutoCloseable
public class JarFile extends JarFile
字段概要
字段 修饰符和类型 字段 说明 static intCENATTstatic intCENATXstatic intCENCOMstatic intCENCRCstatic intCENDSKstatic intCENEXTstatic intCENFLGstatic intCENHDRstatic intCENHOWstatic intCENLENstatic intCENNAMstatic intCENOFFstatic longCENSIGstatic intCENSIZstatic intCENTIMstatic intCENVEMstatic intCENVERstatic intENDCOMstatic intENDHDRstatic intENDOFFstatic longENDSIGstatic intENDSIZstatic intENDSUBstatic intENDTOTstatic intEXTCRCstatic intEXTHDRstatic intEXTLENstatic longEXTSIGstatic intEXTSIZstatic intLOCCRCstatic intLOCEXTstatic intLOCFLGstatic intLOCHDRstatic intLOCHOWstatic intLOCLENstatic intLOCNAMstatic longLOCSIGstatic intLOCSIZstatic intLOCTIMstatic intLOCVER从类继承的字段 java.util.zip.ZipFile
OPEN_DELETE, OPEN_READ
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclearCache()voidclose()booleancontainsEntry(String name)Enumeration<JarEntry>entries()ZipEntrygetEntry(String name)InputStreamgetInputStream(ZipEntry ze)InputStreamgetInputStream(ZipEntry ze, RandomAccessData.ResourceAccess access)org.springframework.boot.loader.jar.JarEntrygetJarEntry(String name)ManifestgetManifest()StringgetName()JarFilegetNestedJarFile(ZipEntry entry)Return a nestedJarFileloaded from the specified entry.JarFilegetNestedJarFile(org.springframework.boot.loader.jar.JarEntry entry)Return a nestedJarFileloaded from the specified entry.protected StringgetPathFromRoot()protected RandomAccessDataFilegetRootJarFile()URLgetUrl()Return a URL that can be used to access this JAR file.static voidregisterUrlProtocolHandler()Register a 'java.protocol.handler.pkgs' property so that aURLStreamHandlerwill be located to deal with jar URLs.intsize()StringtoString()从类继承的方法 java.util.jar.JarFile
baseVersion, getVersion, isMultiRelease, runtimeVersion, stream, versionedStream
从类继承的方法 java.util.zip.ZipFile
finalize, getComment
字段详细资料
LOCSIG
public static final long LOCSIG
- 另请参阅:
 - 常量字段值
 
EXTSIG
public static final long EXTSIG
- 另请参阅:
 - 常量字段值
 
CENSIG
public static final long CENSIG
- 另请参阅:
 - 常量字段值
 
ENDSIG
public static final long ENDSIG
- 另请参阅:
 - 常量字段值
 
LOCHDR
public static final int LOCHDR
- 另请参阅:
 - 常量字段值
 
EXTHDR
public static final int EXTHDR
- 另请参阅:
 - 常量字段值
 
CENHDR
public static final int CENHDR
- 另请参阅:
 - 常量字段值
 
ENDHDR
public static final int ENDHDR
- 另请参阅:
 - 常量字段值
 
LOCVER
public static final int LOCVER
- 另请参阅:
 - 常量字段值
 
LOCFLG
public static final int LOCFLG
- 另请参阅:
 - 常量字段值
 
LOCHOW
public static final int LOCHOW
- 另请参阅:
 - 常量字段值
 
LOCTIM
public static final int LOCTIM
- 另请参阅:
 - 常量字段值
 
LOCCRC
public static final int LOCCRC
- 另请参阅:
 - 常量字段值
 
LOCSIZ
public static final int LOCSIZ
- 另请参阅:
 - 常量字段值
 
LOCLEN
public static final int LOCLEN
- 另请参阅:
 - 常量字段值
 
LOCNAM
public static final int LOCNAM
- 另请参阅:
 - 常量字段值
 
LOCEXT
public static final int LOCEXT
- 另请参阅:
 - 常量字段值
 
EXTCRC
public static final int EXTCRC
- 另请参阅:
 - 常量字段值
 
EXTSIZ
public static final int EXTSIZ
- 另请参阅:
 - 常量字段值
 
EXTLEN
public static final int EXTLEN
- 另请参阅:
 - 常量字段值
 
CENVEM
public static final int CENVEM
- 另请参阅:
 - 常量字段值
 
CENVER
public static final int CENVER
- 另请参阅:
 - 常量字段值
 
CENFLG
public static final int CENFLG
- 另请参阅:
 - 常量字段值
 
CENHOW
public static final int CENHOW
- 另请参阅:
 - 常量字段值
 
CENTIM
public static final int CENTIM
- 另请参阅:
 - 常量字段值
 
CENCRC
public static final int CENCRC
- 另请参阅:
 - 常量字段值
 
CENSIZ
public static final int CENSIZ
- 另请参阅:
 - 常量字段值
 
CENLEN
public static final int CENLEN
- 另请参阅:
 - 常量字段值
 
CENNAM
public static final int CENNAM
- 另请参阅:
 - 常量字段值
 
CENEXT
public static final int CENEXT
- 另请参阅:
 - 常量字段值
 
CENCOM
public static final int CENCOM
- 另请参阅:
 - 常量字段值
 
CENDSK
public static final int CENDSK
- 另请参阅:
 - 常量字段值
 
CENATT
public static final int CENATT
- 另请参阅:
 - 常量字段值
 
CENATX
public static final int CENATX
- 另请参阅:
 - 常量字段值
 
CENOFF
public static final int CENOFF
- 另请参阅:
 - 常量字段值
 
ENDSUB
public static final int ENDSUB
- 另请参阅:
 - 常量字段值
 
ENDTOT
public static final int ENDTOT
- 另请参阅:
 - 常量字段值
 
ENDSIZ
public static final int ENDSIZ
- 另请参阅:
 - 常量字段值
 
ENDOFF
public static final int ENDOFF
- 另请参阅:
 - 常量字段值
 
ENDCOM
public static final int ENDCOM
- 另请参阅:
 - 常量字段值
 
构造器详细资料
JarFile
public JarFile(File file) throws IOException
Create a newJarFilebacked by the specified file.- 参数:
 file- the root jar file- 抛出:
 IOException- if the file cannot be read
方法详细资料
getRootJarFile
protected final RandomAccessDataFile getRootJarFile()
getManifest
public Manifest getManifest() throws IOException
- 覆盖:
 getManifest在类中JarFile- 抛出:
 IOException
entries
public Enumeration<JarEntry> entries()
getJarEntry
public org.springframework.boot.loader.jar.JarEntry getJarEntry(String name)
- 覆盖:
 getJarEntry在类中JarFile
containsEntry
public boolean containsEntry(String name)
getInputStream
public InputStream getInputStream(ZipEntry ze) throws IOException
- 覆盖:
 getInputStream在类中JarFile- 抛出:
 IOException
getInputStream
public InputStream getInputStream(ZipEntry ze, RandomAccessData.ResourceAccess access) throws IOException
- 抛出:
 IOException
getNestedJarFile
public JarFile getNestedJarFile(ZipEntry entry) throws IOException
Return a nestedJarFileloaded from the specified entry.- 参数:
 entry- the zip entry- 返回:
 - a 
JarFilefor the entry - 抛出:
 IOException- if the nested jar file cannot be read
getNestedJarFile
public JarFile getNestedJarFile(org.springframework.boot.loader.jar.JarEntry entry) throws IOException
Return a nestedJarFileloaded from the specified entry.- 参数:
 entry- the zip entry- 返回:
 - a 
JarFilefor the entry - 抛出:
 IOException- if the nested jar file cannot be read
close
public void close() throws IOException
- 指定者:
 close在接口中AutoCloseable- 指定者:
 close在接口中Closeable- 覆盖:
 close在类中ZipFile- 抛出:
 IOException
getUrl
public URL getUrl() throws MalformedURLException
Return a URL that can be used to access this JAR file. NOTE: the specified URL cannot be serialized and or cloned.- 返回:
 - the URL
 - 抛出:
 MalformedURLException- if the URL is malformed
clearCache
public void clearCache()
getPathFromRoot
protected String getPathFromRoot()
registerUrlProtocolHandler
public static void registerUrlProtocolHandler()
Register a 'java.protocol.handler.pkgs' property so that aURLStreamHandlerwill be located to deal with jar URLs.