Class ZipContent.Entry
java.lang.Object
org.springframework.boot.loader.zip.ZipContent.Entry
- Enclosing class:
ZipContent
-
Method Summary
Modifier and TypeMethodDescription<E extends ZipEntry>
Eas(BiFunction<ZipContent.Entry, String, E> factory) <E extends ZipEntry>
EintReturn the compression method for this entry.intReturn the lookup index of the entry.getName()Return the name of this entry.intReturn the uncompressed size of this entry.booleanhasNameStartingWith(CharSequence prefix) Returnstrueif this entry has a name starting with the given prefix.booleanReturntrueif this is a directory entry.Open aDataBlockproviding access to raw contents of the entry (not including the local file header).
-
Method Details
-
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.- Returns:
- the entry lookup index
-
isDirectory
public boolean isDirectory()Returntrueif this is a directory entry.- Returns:
- if the entry is a directory
-
hasNameStartingWith
Returnstrueif this entry has a name starting with the given prefix.- Parameters:
prefix- the required prefix- Returns:
- if the entry name starts with the prefix
-
getName
-
getCompressionMethod
public int getCompressionMethod()Return the compression method for this entry.- Returns:
- the compression method
- See Also:
-
getUncompressedSize
public int getUncompressedSize()Return the uncompressed size of this entry.- Returns:
- the uncompressed size
-
openContent
Open aDataBlockproviding 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.- Returns:
- the contents of the entry
- Throws:
IOException- on I/O error
-
as
-
as
- Type Parameters:
E- the entry type- Parameters:
factory- the factory used to create theZipEntry- Returns:
- a fully populated zip entry
-