Package com.twelvemonkeys.io.ole2
Class Entry
java.lang.Object
com.twelvemonkeys.io.ole2.Entry
- All Implemented Interfaces:
Comparable<Entry>
Represents an OLE 2 compound document entry.
This is similar to a file in a file system, or an entry in a ZIP or JAR file.
- Version:
- $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/io/ole2/Entry.java#4 $
- Author:
- Harald Kuhr, last modified by $Author: haku $
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionint
long
created()
Returns the time that this entry was created.boolean
Returns the children of thisEntry
.getChildEntry
(String pName) Returns the child of thisEntry
with the given name.Returns theInputStream
for thisEntry
getName()
Returns the name of thisEntry
Return the parent of thisEntry
int
hashCode()
boolean
Iftrue
thisEntry
is a directoryEntry
.boolean
isFile()
Iftrue
thisEntry
is a file (document)Entry
.boolean
isRoot()
Iftrue
thisEntry
is the rootEntry
.long
Returns the time that this entry was last modified.long
length()
Returns the length of this entrytoString()
-
Field Details
-
LENGTH
public static final int LENGTH- See Also:
-
-
Method Details
-
isRoot
public boolean isRoot()Iftrue
thisEntry
is the rootEntry
.- Returns:
true
if this is the rootEntry
-
isDirectory
public boolean isDirectory()Iftrue
thisEntry
is a directoryEntry
.- Returns:
true
if this is a directoryEntry
-
isFile
public boolean isFile()Iftrue
thisEntry
is a file (document)Entry
.- Returns:
true
if this is a documentEntry
-
getName
Returns the name of thisEntry
- Returns:
- the name of this
Entry
-
getInputStream
Returns theInputStream
for thisEntry
- Returns:
- an
InputStream
containing the data for thisEntry
ornull
if this is a directoryEntry
- Throws:
IOException
- if an I/O exception occurs- See Also:
-
length
public long length()Returns the length of this entry- Returns:
- the length of the stream for this entry, or
0
if this is a directoryEntry
- See Also:
-
created
public long created()Returns the time that this entry was created. The time is converted from its internal representation to standard Java representation, milliseconds since the epoch (00:00:00 GMT, January 1, 1970).Note that most applications leaves this value empty (
0L
).- Returns:
- A
long
value representing the time this entry was created, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or0L
if no creation time stamp exists for this entry.
-
lastModified
public long lastModified()Returns the time that this entry was last modified. The time is converted from its internal representation to standard Java representation, milliseconds since the epoch (00:00:00 GMT, January 1, 1970).Note that many applications leaves this value empty (
0L
).- Returns:
- A
long
value representing the time this entry was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or0L
if no modification time stamp exists for this entry.
-
getParentEntry
Return the parent of thisEntry
- Returns:
- the parent of this
Entry
, ornull
if this is the rootEntry
-
getChildEntry
Returns the child of thisEntry
with the given name.- Parameters:
pName
- the name of the childEntry
- Returns:
- the child
Entry
ornull
if thee is no such child - Throws:
IOException
- if an I/O exception occurs
-
getChildEntries
Returns the children of thisEntry
.- Returns:
- a
SortedSet
ofEntry
objects - Throws:
IOException
- if an I/O exception occurs
-
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Entry>
-