|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.poi.poifs.filesystem.EntryNode
org.apache.poi.poifs.filesystem.DirectoryNode
public class DirectoryNode
Simple implementation of DirectoryEntry
| Method Summary | |
|---|---|
DirectoryEntry |
createDirectory(java.lang.String name)
create a new DirectoryEntry |
DocumentEntry |
createDocument(java.lang.String name,
java.io.InputStream stream)
create a new DocumentEntry |
DocumentEntry |
createDocument(java.lang.String name,
int size,
POIFSWriterListener writer)
create a new DocumentEntry; the data will be provided later |
DocumentInputStream |
createDocumentInputStream(Entry document)
open a document in the directory's entry's list of entries |
DocumentInputStream |
createDocumentInputStream(java.lang.String documentName)
open a document in the directory's entry's list of entries |
DocumentEntry |
createOrUpdateDocument(java.lang.String name,
java.io.InputStream stream)
Set the contents of a document, creating if needed, otherwise updating. |
java.util.Iterator<Entry> |
getEntries()
get an iterator of the Entry instances contained directly in this instance (in other words, children only; no grandchildren etc.) |
Entry |
getEntry(java.lang.String name)
get a specified Entry by name |
int |
getEntryCount()
find out how many Entry instances are contained directly within this DirectoryEntry |
java.util.Set<java.lang.String> |
getEntryNames()
get the names of all the Entries contained directly in this instance (in other words, names of children only; no grandchildren etc). |
NPOIFSFileSystem |
getFileSystem()
|
NPOIFSFileSystem |
getNFileSystem()
If this is NPOIFS based, return the NPOIFSFileSystem that this belong to, otherwise Null if OPOIFS based |
OPOIFSFileSystem |
getOFileSystem()
If this is OPOIFS based, return the NPOIFSFileSystem that this belong to, otherwise Null if NPOIFS based |
POIFSDocumentPath |
getPath()
|
java.lang.String |
getShortDescription()
Provides a short description of the object, to be used when a POIFSViewable object has not provided its contents. |
ClassID |
getStorageClsid()
Gets the storage clsid of the directory entry |
java.lang.Object[] |
getViewableArray()
Get an array of objects, some of which may implement POIFSViewable |
java.util.Iterator<java.lang.Object> |
getViewableIterator()
Get an Iterator of objects, some of which may implement POIFSViewable |
boolean |
hasEntry(java.lang.String name)
Checks if entry with specified name present |
protected boolean |
isDeleteOK()
extensions use this method to verify internal rules regarding deletion of the underlying store. |
boolean |
isDirectoryEntry()
is this a DirectoryEntry? |
boolean |
isEmpty()
is this DirectoryEntry empty? |
java.util.Iterator<Entry> |
iterator()
Returns an Iterator over all the entries |
boolean |
preferArray()
Give viewers a hint as to whether to call getViewableArray or getViewableIterator |
void |
setStorageClsid(ClassID clsidStorage)
Sets the storage clsid for the directory entry |
| Methods inherited from class org.apache.poi.poifs.filesystem.EntryNode |
|---|
delete, getName, getParent, getProperty, isDocumentEntry, isRoot, renameTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.poi.poifs.filesystem.Entry |
|---|
delete, getName, getParent, isDocumentEntry, renameTo |
| Method Detail |
|---|
public POIFSDocumentPath getPath()
public NPOIFSFileSystem getFileSystem()
public OPOIFSFileSystem getOFileSystem()
public NPOIFSFileSystem getNFileSystem()
public DocumentInputStream createDocumentInputStream(java.lang.String documentName)
throws java.io.IOException
documentName - the name of the document to be opened
java.io.IOException - if the document does not exist or the
name is that of a DirectoryEntry
public DocumentInputStream createDocumentInputStream(Entry document)
throws java.io.IOException
document - the document to be opened
java.io.IOException - if the document does not exist or the
name is that of a DirectoryEntrypublic java.util.Iterator<Entry> getEntries()
getEntries in interface DirectoryEntrypublic java.util.Set<java.lang.String> getEntryNames()
getEntryNames in interface DirectoryEntrypublic boolean isEmpty()
isEmpty in interface DirectoryEntrypublic int getEntryCount()
getEntryCount in interface DirectoryEntrypublic boolean hasEntry(java.lang.String name)
DirectoryEntry
hasEntry in interface DirectoryEntry
public Entry getEntry(java.lang.String name)
throws java.io.FileNotFoundException
getEntry in interface DirectoryEntryname - the name of the Entry to obtain.
java.io.FileNotFoundException - if no Entry with the specified
name exists in this DirectoryEntry
public DocumentEntry createDocument(java.lang.String name,
java.io.InputStream stream)
throws java.io.IOException
createDocument in interface DirectoryEntryname - the name of the new DocumentEntrystream - the InputStream from which to create the new
DocumentEntry
java.io.IOException
public DocumentEntry createDocument(java.lang.String name,
int size,
POIFSWriterListener writer)
throws java.io.IOException
createDocument in interface DirectoryEntryname - the name of the new DocumentEntrysize - the size of the new DocumentEntrywriter - the writer of the new DocumentEntry
java.io.IOException
public DirectoryEntry createDirectory(java.lang.String name)
throws java.io.IOException
createDirectory in interface DirectoryEntryname - the name of the new DirectoryEntry
java.io.IOException
public DocumentEntry createOrUpdateDocument(java.lang.String name,
java.io.InputStream stream)
throws java.io.IOException
name - the name of the new or existing DocumentEntrystream - the InputStream from which to populate the DocumentEntry
java.io.IOExceptionpublic ClassID getStorageClsid()
getStorageClsid in interface DirectoryEntrypublic void setStorageClsid(ClassID clsidStorage)
setStorageClsid in interface DirectoryEntryclsidStorage - storage Class IDpublic boolean isDirectoryEntry()
isDirectoryEntry in interface EntryisDirectoryEntry in class EntryNodeprotected boolean isDeleteOK()
isDeleteOK in class EntryNodepublic java.lang.Object[] getViewableArray()
getViewableArray in interface POIFSViewablepublic java.util.Iterator<java.lang.Object> getViewableIterator()
getViewableIterator in interface POIFSViewablepublic boolean preferArray()
preferArray in interface POIFSViewablepublic java.lang.String getShortDescription()
getShortDescription in interface POIFSViewablepublic java.util.Iterator<Entry> iterator()
iterator in interface java.lang.Iterable<Entry>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||