| Constructor and 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.
|
| Modifier and Type | Method and 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, or
null if it doesn't
have one. |
long |
getSize()
Returns the size of this data entry, in bytes, or -1 if unknown.
|
boolean |
isDirectory()
Returns whether the data entry represents a directory.
|
java.lang.String |
toString() |
public ClassPathDataEntry(java.lang.Class clazz)
clazz - the class for which to create a data entry.public ClassPathDataEntry(java.lang.String name)
name - the name of the class for which to create a data entry.public java.lang.String getName()
DataEntrypublic java.lang.String getOriginalName()
DataEntrygetOriginalName in interface DataEntrypublic long getSize()
DataEntrypublic boolean isDirectory()
DataEntryisDirectory in interface DataEntrypublic java.io.InputStream getInputStream()
throws java.io.IOException
DataEntrygetInputStream in interface DataEntryjava.io.IOExceptionpublic void closeInputStream()
throws java.io.IOException
DataEntrycloseInputStream in interface DataEntryjava.io.IOExceptionpublic DataEntry getParent()
DataEntrynull if it doesn't
have one.public java.lang.String toString()
toString in class java.lang.Object