Package proguard.io
Class ClassPathDataEntry
- java.lang.Object
-
- proguard.io.ClassPathDataEntry
-
-
Constructor Summary
Constructors Constructor Description ClassPathDataEntry(java.lang.Class clazz)Creas an new ClassPathDataEntry for the given class.ClassPathDataEntry(java.lang.String name)Creates a new ClassPathDataEntry for the entry with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseInputStream()Closes the previously retrieved InputStream.java.io.InputStreamgetInputStream()Returns an input stream for reading the content of this data entry.java.lang.StringgetName()Returns the name of this data entry.java.lang.StringgetOriginalName()Returns the original name of this data entry, i.e.DataEntrygetParent()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.booleanisDirectory()Returns whether the data entry represents a directory.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ClassPathDataEntry
public ClassPathDataEntry(java.lang.Class clazz)
Creas an new ClassPathDataEntry for the given class.- Parameters:
clazz- the class for which to create a data entry.
-
ClassPathDataEntry
public ClassPathDataEntry(java.lang.String name)
Creates a new ClassPathDataEntry for the entry with the given name.- Parameters:
name- the name of the class for which to create a data entry.
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:DataEntryReturns the name of this data entry.
-
getOriginalName
public java.lang.String 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
public java.io.InputStream getInputStream() throws java.io.IOExceptionDescription 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:
java.io.IOException
-
closeInputStream
public void closeInputStream() throws java.io.IOExceptionDescription copied from interface:DataEntryCloses the previously retrieved InputStream.- Specified by:
closeInputStreamin interfaceDataEntry- Throws:
java.io.IOException
-
getParent
public DataEntry getParent()
Description copied from interface:DataEntryReturns the parent of this data entry, ornull if it doesn't have one.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-