Example usage for org.springframework.boot.loader.tools Library getName

List of usage examples for org.springframework.boot.loader.tools Library getName

Introduction

In this page you can find the example usage for org.springframework.boot.loader.tools Library getName.

Prototype

public String getName() 

Source Link

Document

Return the name of file as it should be written.

Usage

From source file:org.springframework.boot.loader.tools.JarWriter.java

/**
 * Write a nested library./*from   w w w .  j  ava  2 s. c o  m*/
 * @param destination the destination of the library
 * @param library the library
 * @throws IOException if the write fails
 */
public void writeNestedLibrary(String destination, Library library) throws IOException {
    File file = library.getFile();
    JarArchiveEntry entry = new JarArchiveEntry(destination + library.getName());
    entry.setTime(getNestedLibraryTime(file));
    new CrcAndSize(file).setupStoredEntry(entry);
    writeEntry(entry, new InputStreamEntryWriter(new FileInputStream(file), true),
            new LibraryUnpackHandler(library));
}