Constructor and Description |
---|
FileDataEntry(java.io.File file)
Creates a new FileDataEntry.
|
FileDataEntry(java.io.File directory,
java.io.File file)
Creates a new FileDataEntry.
|
Modifier and Type | Method and Description |
---|---|
void |
closeInputStream()
Closes the previously retrieved InputStream.
|
java.io.File |
getFile()
Returns the complete file, including its directory.
|
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 FileDataEntry(java.io.File file)
file
- the the absolute or relative location of the file.public FileDataEntry(java.io.File directory, java.io.File file)
directory
- the base directory for the file.file
- the the absolute or relative location of the file.public java.io.File getFile()
public java.lang.String getName()
DataEntry
public java.lang.String getOriginalName()
DataEntry
getOriginalName
in interface DataEntry
public long getSize()
DataEntry
public boolean isDirectory()
DataEntry
isDirectory
in interface DataEntry
public java.io.InputStream getInputStream() throws java.io.IOException
DataEntry
getInputStream
in interface DataEntry
java.io.IOException
public void closeInputStream() throws java.io.IOException
DataEntry
closeInputStream
in interface DataEntry
java.io.IOException
public DataEntry getParent()
DataEntry
null if it doesn't
have one.
public java.lang.String toString()
toString
in class java.lang.Object