类 ZipContent.Entry

java.lang.Object
org.springframework.boot.loader.zip.ZipContent.Entry
封闭类:
ZipContent

public class ZipContent.Entry extends Object
A single zip content entry.
  • 方法详细资料

    • getLookupIndex

      public int getLookupIndex()
      Return the lookup index of the entry. Each entry has a unique lookup index but they aren't the same as the order that the entry was loaded.
      返回:
      the entry lookup index
    • isDirectory

      public boolean isDirectory()
      Return true if this is a directory entry.
      返回:
      if the entry is a directory
    • hasNameStartingWith

      public boolean hasNameStartingWith(CharSequence prefix)
      Returns true if this entry has a name starting with the given prefix.
      参数:
      prefix - the required prefix
      返回:
      if the entry name starts with the prefix
    • getName

      public String getName()
      Return the name of this entry.
      返回:
      the entry name
    • getCompressionMethod

      public int getCompressionMethod()
      Return the compression method for this entry.
      返回:
      the compression method
      另请参阅:
    • getUncompressedSize

      public int getUncompressedSize()
      Return the uncompressed size of this entry.
      返回:
      the uncompressed size
    • openContent

      public CloseableDataBlock openContent() throws IOException
      Open a DataBlock providing access to raw contents of the entry (not including the local file header).

      To release resources, the ZipContent.close() method of the data block should be called explicitly or by try-with-resources.

      返回:
      the contents of the entry
      抛出:
      IOException - on I/O error
    • as

      public <E extends ZipEntry> E as(Function<String,E> factory)
      Adapt the raw entry into a ZipEntry or ZipEntry subclass.
      类型参数:
      E - the entry type
      参数:
      factory - the factory used to create the ZipEntry
      返回:
      a fully populated zip entry
    • as

      public <E extends ZipEntry> E as(BiFunction<ZipContent.Entry,String,E> factory)
      Adapt the raw entry into a ZipEntry or ZipEntry subclass.
      类型参数:
      E - the entry type
      参数:
      factory - the factory used to create the ZipEntry
      返回:
      a fully populated zip entry