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

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

Introduction

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

Prototype

public File getFile() 

Source Link

Document

Return the library file.

Usage

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

/**
 * Write a nested library.//from  ww w . j  a  v a  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));
}