public final class Entry extends Object implements Comparable<Entry>
CompoundDocument
Modifier and Type | Field and Description |
---|---|
static int |
LENGTH |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Entry pOther) |
long |
created()
Returns the time that this entry was created.
|
boolean |
equals(Object pOther) |
SortedSet<Entry> |
getChildEntries()
Returns the children of this
Entry . |
Entry |
getChildEntry(String pName)
Returns the child of this
Entry with the given name. |
SeekableInputStream |
getInputStream()
Returns the
InputStream for this Entry |
String |
getName()
Returns the name of this
Entry |
Entry |
getParentEntry()
Return the parent of this
Entry |
int |
hashCode() |
boolean |
isDirectory()
If
true this Entry is a directory
Entry . |
boolean |
isFile()
If
true this Entry is a file (document)
Entry . |
boolean |
isRoot()
If
true this Entry is the root Entry . |
long |
lastModified()
Returns the time that this entry was last modified.
|
long |
length()
Returns the length of this entry
|
String |
toString() |
public static final int LENGTH
public boolean isRoot()
true
this Entry
is the root Entry
.true
if this is the root Entry
public boolean isDirectory()
true
this Entry
is a directory
Entry
.true
if this is a directory Entry
public boolean isFile()
true
this Entry
is a file (document)
Entry
.true
if this is a document Entry
public String getName()
Entry
Entry
public SeekableInputStream getInputStream() throws IOException
InputStream
for this Entry
InputStream
containing the data for this
Entry
or null
if this is a directory Entry
IOException
- if an I/O exception occurslength()
public long length()
0
if this is
a directory Entry
getInputStream()
public long created()
0L
).long
value representing the time this entry was
created, measured in milliseconds since the epoch
(00:00:00 GMT, January 1, 1970), or 0L
if no
creation time stamp exists for this entry.public long lastModified()
0L
).long
value representing the time this entry was
last modified, measured in milliseconds since the epoch
(00:00:00 GMT, January 1, 1970), or 0L
if no
modification time stamp exists for this entry.public Entry getParentEntry()
Entry
Entry
, or null
if this is
the root Entry
public Entry getChildEntry(String pName) throws IOException
Entry
with the given name.pName
- the name of the child Entry
Entry
or null
if thee is no such
childIOException
- if an I/O exception occurspublic SortedSet<Entry> getChildEntries() throws IOException
Entry
.SortedSet
of Entry
objectsIOException
- if an I/O exception occurspublic int compareTo(Entry pOther)
compareTo
in interface Comparable<Entry>
Copyright © 2017. All rights reserved.