类 JarWriter
java.lang.Object
org.springframework.boot.loader.tools.AbstractJarWriter
org.springframework.boot.loader.tools.JarWriter
- 所有已实现的接口:
AutoCloseable
,LoaderClassesWriter
Writes JAR content, ensuring valid directory entries are always created and duplicate
items are ignored.
- 从以下版本开始:
- 1.0.0
- 作者:
- Phillip Webb, Andy Wilkinson, Madhura Bhave, Scott Frederick
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
close()
Close the writer.protected void
writeToArchive
(ZipEntry entry, EntryWriter entryWriter) 从类继承的方法 org.springframework.boot.loader.tools.AbstractJarWriter
writeEntry, writeEntry, writeIndexFile, writeLoaderClasses, writeLoaderClasses, writeLoaderClasses, writeManifest, writeNestedLibrary
-
构造器详细资料
-
JarWriter
Create a newJarWriter
instance.- 参数:
file
- the file to write- 抛出:
IOException
- if the file cannot be openedFileNotFoundException
- if the file cannot be found
-
JarWriter
Create a newJarWriter
instance.- 参数:
file
- the file to writelaunchScript
- an optional launch script to prepend to the front of the jar- 抛出:
IOException
- if the file cannot be openedFileNotFoundException
- if the file cannot be found
-
JarWriter
public JarWriter(File file, LaunchScript launchScript, FileTime lastModifiedTime) throws FileNotFoundException, IOException Create a newJarWriter
instance.- 参数:
file
- the file to writelaunchScript
- an optional launch script to prepend to the front of the jarlastModifiedTime
- an optional last modified time to apply to the written entries- 抛出:
IOException
- if the file cannot be openedFileNotFoundException
- if the file cannot be found- 从以下版本开始:
- 2.3.0
-
-
方法详细资料
-
writeToArchive
- 指定者:
writeToArchive
在类中AbstractJarWriter
- 抛出:
IOException
-
close
Close the writer.- 指定者:
close
在接口中AutoCloseable
- 抛出:
IOException
- if the file cannot be closed
-