类 AbstractJarWriter

java.lang.Object
org.springframework.boot.loader.tools.AbstractJarWriter
所有已实现的接口:
LoaderClassesWriter
直接已知子类:
JarWriter

public abstract class AbstractJarWriter extends Object implements LoaderClassesWriter
Abstract base class for JAR writers.
从以下版本开始:
2.3.0
作者:
Phillip Webb, Andy Wilkinson, Madhura Bhave
  • 构造器详细资料

    • AbstractJarWriter

      public AbstractJarWriter()
  • 方法详细资料

    • writeManifest

      public void writeManifest(Manifest manifest) throws IOException
      Write the specified manifest.
      参数:
      manifest - the manifest to write
      抛出:
      IOException - of the manifest cannot be written
    • writeEntry

      public void writeEntry(String entryName, InputStream inputStream) throws IOException
      Writes an entry. The inputStream is closed once the entry has been written
      指定者:
      writeEntry 在接口中 LoaderClassesWriter
      参数:
      entryName - the name of the entry
      inputStream - the stream from which the entry's data can be read
      抛出:
      IOException - if the write fails
    • writeEntry

      public void writeEntry(String entryName, EntryWriter entryWriter) throws IOException
      Writes an entry. The inputStream is closed once the entry has been written
      参数:
      entryName - the name of the entry
      entryWriter - the entry writer
      抛出:
      IOException - if the write fails
    • writeNestedLibrary

      public void writeNestedLibrary(String location, Library library) throws IOException
      Write a nested library.
      参数:
      location - the destination of the library
      library - the library
      抛出:
      IOException - if the write fails
    • writeIndexFile

      public void writeIndexFile(String location, Collection<String> lines) throws IOException
      Write a simple index file containing the specified UTF-8 lines.
      参数:
      location - the location of the index file
      lines - the lines to write
      抛出:
      IOException - if the write fails
      从以下版本开始:
      2.3.0
    • writeLoaderClasses

      public void writeLoaderClasses() throws IOException
      从接口复制的说明: LoaderClassesWriter
      Write the default required spring-boot-loader classes to the JAR.
      指定者:
      writeLoaderClasses 在接口中 LoaderClassesWriter
      抛出:
      IOException - if the classes cannot be written
    • writeLoaderClasses

      public void writeLoaderClasses(LoaderImplementation loaderImplementation) throws IOException
      从接口复制的说明: LoaderClassesWriter
      Write the default required spring-boot-loader classes to the JAR.
      指定者:
      writeLoaderClasses 在接口中 LoaderClassesWriter
      参数:
      loaderImplementation - the specific implementation to write
      抛出:
      IOException - if the classes cannot be written
    • writeLoaderClasses

      public void writeLoaderClasses(String loaderJarResourceName) throws IOException
      Write the required spring-boot-loader classes to the JAR.
      指定者:
      writeLoaderClasses 在接口中 LoaderClassesWriter
      参数:
      loaderJarResourceName - the name of the resource containing the loader classes to be written
      抛出:
      IOException - if the classes cannot be written
    • writeToArchive

      protected abstract void writeToArchive(ZipEntry entry, EntryWriter entryWriter) throws IOException
      抛出:
      IOException