Package proguard.io
Class ZipFileDataEntry
- java.lang.Object
-
- proguard.io.ZipFileDataEntry
-
-
Constructor Summary
Constructors Constructor Description ZipFileDataEntry​(DataEntry parent, java.util.zip.ZipEntry zipEntry, java.util.zip.ZipFile zipFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeInputStream()
Closes the previously retrieved InputStream.java.io.InputStream
getInputStream()
Returns an input stream for reading the content of this data entry.java.lang.String
getName()
Returns the name of this data entry.java.lang.String
getOriginalName()
Returns the original name of this data entry, i.e.DataEntry
getParent()
Returns the parent of this data entry, ornull if it doesn't have one.
long
getSize()
Returns the approximate size of this zip file entry.long
getUncompressedSize()
Returns the uncompressed size of the underlying zip entry.boolean
isDirectory()
Returns whether the data entry represents a directory.java.lang.String
toString()
-
-
-
Constructor Detail
-
ZipFileDataEntry
public ZipFileDataEntry​(DataEntry parent, java.util.zip.ZipEntry zipEntry, java.util.zip.ZipFile zipFile)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:DataEntry
Returns the name of this data entry.
-
getOriginalName
public java.lang.String getOriginalName()
Description copied from interface:DataEntry
Returns the original name of this data entry, i.e. the name of the data entry before any renaming or obfuscation.- Specified by:
getOriginalName
in interfaceDataEntry
-
getSize
public long getSize()
Returns the approximate size of this zip file entry. Specifically, this returns the maximum of the entry's uncompressed and compressed sizes.NB: For small entry sizes and incompressible data, this can lead to unexpected results, such as the returned result being larger than the logical/uncompressed size of the entry.
-
getUncompressedSize
public long getUncompressedSize()
Returns the uncompressed size of the underlying zip entry.
-
isDirectory
public boolean isDirectory()
Description copied from interface:DataEntry
Returns whether the data entry represents a directory.- Specified by:
isDirectory
in interfaceDataEntry
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
Description copied from interface:DataEntry
Returns an input stream for reading the content of this data entry. The data entry may not represent a directory.- Specified by:
getInputStream
in interfaceDataEntry
- Throws:
java.io.IOException
-
closeInputStream
public void closeInputStream() throws java.io.IOException
Description copied from interface:DataEntry
Closes the previously retrieved InputStream.- Specified by:
closeInputStream
in interfaceDataEntry
- Throws:
java.io.IOException
-
getParent
public DataEntry getParent()
Description copied from interface:DataEntry
Returns the parent of this data entry, ornull if it doesn't have one.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-