Package proguard.io
Class FileDataEntry
java.lang.Object
proguard.io.FileDataEntry
- All Implemented Interfaces:
DataEntry
This
DataEntry represents a file.-
Constructor Summary
ConstructorsConstructorDescriptionFileDataEntry(File file) Creates a new FileDataEntry.FileDataEntry(File directory, File file) Creates a new FileDataEntry. -
Method Summary
Modifier and TypeMethodDescriptionvoidCloses the previously retrieved InputStream.getFile()Returns the complete file, including its directory.Returns an input stream for reading the content of this data entry.getName()Returns the name of this data entry.Returns the original name of this data entry, i.e.Returns the parent of this data entry, ornull if it doesn't have one.longgetSize()Returns the size of this data entry, in bytes, or -1 if unknown.booleanReturns whether the data entry represents a directory.toString()
-
Constructor Details
-
FileDataEntry
Creates a new FileDataEntry.- Parameters:
file- the the absolute or relative location of the file.
-
FileDataEntry
Creates a new FileDataEntry.- Parameters:
directory- the base directory for the file.file- the the absolute or relative location of the file.
-
-
Method Details
-
getFile
Returns the complete file, including its directory. -
getName
Description copied from interface:DataEntryReturns the name of this data entry. -
getOriginalName
Description copied from interface:DataEntryReturns the original name of this data entry, i.e. the name of the data entry before any renaming or obfuscation.- Specified by:
getOriginalNamein interfaceDataEntry
-
getSize
public long getSize()Description copied from interface:DataEntryReturns the size of this data entry, in bytes, or -1 if unknown. -
isDirectory
public boolean isDirectory()Description copied from interface:DataEntryReturns whether the data entry represents a directory.- Specified by:
isDirectoryin interfaceDataEntry
-
getInputStream
Description copied from interface:DataEntryReturns an input stream for reading the content of this data entry. The data entry may not represent a directory.- Specified by:
getInputStreamin interfaceDataEntry- Throws:
IOException
-
closeInputStream
Description copied from interface:DataEntryCloses the previously retrieved InputStream.- Specified by:
closeInputStreamin interfaceDataEntry- Throws:
IOException
-
getParent
Description copied from interface:DataEntryReturns the parent of this data entry, ornull if it doesn't have one. -
toString
-