类 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 int
CENATT
static int
CENATX
static int
CENCOM
static int
CENCRC
static int
CENDSK
static int
CENEXT
static int
CENFLG
static int
CENHDR
static int
CENHOW
static int
CENLEN
static int
CENNAM
static int
CENOFF
static long
CENSIG
static int
CENSIZ
static int
CENTIM
static int
CENVEM
static int
CENVER
static int
ENDCOM
static int
ENDHDR
static int
ENDOFF
static long
ENDSIG
static int
ENDSIZ
static int
ENDSUB
static int
ENDTOT
static int
EXTCRC
static int
EXTHDR
static int
EXTLEN
static long
EXTSIG
static int
EXTSIZ
static int
LOCCRC
static int
LOCEXT
static int
LOCFLG
static int
LOCHDR
static int
LOCHOW
static int
LOCLEN
static int
LOCNAM
static long
LOCSIG
static int
LOCSIZ
static int
LOCTIM
static int
LOCVER
从类继承的字段 java.util.zip.ZipFile
OPEN_DELETE, OPEN_READ
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 void
clearCache()
void
close()
boolean
containsEntry(String name)
Enumeration<JarEntry>
entries()
ZipEntry
getEntry(String name)
InputStream
getInputStream(ZipEntry ze)
InputStream
getInputStream(ZipEntry ze, RandomAccessData.ResourceAccess access)
org.springframework.boot.loader.jar.JarEntry
getJarEntry(String name)
Manifest
getManifest()
String
getName()
JarFile
getNestedJarFile(ZipEntry entry)
Return a nestedJarFile
loaded from the specified entry.JarFile
getNestedJarFile(org.springframework.boot.loader.jar.JarEntry entry)
Return a nestedJarFile
loaded from the specified entry.protected String
getPathFromRoot()
protected RandomAccessDataFile
getRootJarFile()
URL
getUrl()
Return a URL that can be used to access this JAR file.static void
registerUrlProtocolHandler()
Register a 'java.protocol.handler.pkgs' property so that aURLStreamHandler
will be located to deal with jar URLs.int
size()
String
toString()
从类继承的方法 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 newJarFile
backed 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 nestedJarFile
loaded from the specified entry.- 参数:
entry
- the zip entry- 返回:
- a
JarFile
for 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 nestedJarFile
loaded from the specified entry.- 参数:
entry
- the zip entry- 返回:
- a
JarFile
for 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 aURLStreamHandler
will be located to deal with jar URLs.