|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.poifs.filesystem.FilteringDirectoryNode
public class FilteringDirectoryNode
A DirectoryEntry filter, which exposes another DirectoryEntry less certain parts. This is typically used when copying or comparing Filesystems.
| Constructor Summary | |
|---|---|
FilteringDirectoryNode(DirectoryEntry directory,
java.util.Collection<java.lang.String> excludes)
Creates a filter round the specified directory, which will exclude entries such as "MyNode" and "MyDir/IgnoreNode". |
|
| 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 |
boolean |
delete()
Delete this Entry. |
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.lang.String |
getName()
get the name of the Entry |
DirectoryEntry |
getParent()
get this Entry's parent (the DirectoryEntry that owns this Entry). |
ClassID |
getStorageClsid()
Gets the storage clsid of the directory entry |
boolean |
hasEntry(java.lang.String name)
Checks if entry with specified name present |
boolean |
isDirectoryEntry()
is this a DirectoryEntry? |
boolean |
isDocumentEntry()
is this a DocumentEntry? |
boolean |
isEmpty()
is this DirectoryEntry empty? |
java.util.Iterator<Entry> |
iterator()
|
boolean |
renameTo(java.lang.String newName)
Rename this Entry. |
void |
setStorageClsid(ClassID clsidStorage)
Sets the storage clsid for the directory entry |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FilteringDirectoryNode(DirectoryEntry directory,
java.util.Collection<java.lang.String> excludes)
directory - The Directory to filterexcludes - The Entries to exclude| Method Detail |
|---|
public DirectoryEntry createDirectory(java.lang.String name)
throws java.io.IOException
DirectoryEntry
createDirectory in interface DirectoryEntryname - the name of the new DirectoryEntry
java.io.IOException
public DocumentEntry createDocument(java.lang.String name,
java.io.InputStream stream)
throws java.io.IOException
DirectoryEntry
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
DirectoryEntry
createDocument in interface DirectoryEntryname - the name of the new DocumentEntrysize - the size of the new DocumentEntrywriter - the writer of the new DocumentEntry
java.io.IOExceptionpublic java.util.Iterator<Entry> getEntries()
DirectoryEntry
getEntries in interface DirectoryEntrypublic java.util.Iterator<Entry> iterator()
iterator in interface java.lang.Iterable<Entry>public int getEntryCount()
DirectoryEntry
getEntryCount in interface DirectoryEntrypublic boolean isEmpty()
DirectoryEntry
isEmpty 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
DirectoryEntry
getEntry in interface DirectoryEntryname - the name of the Entry to obtain.
java.io.FileNotFoundException - if no Entry with the specified
name exists in this DirectoryEntrypublic ClassID getStorageClsid()
DirectoryEntry
getStorageClsid in interface DirectoryEntrypublic void setStorageClsid(ClassID clsidStorage)
DirectoryEntry
setStorageClsid in interface DirectoryEntryclsidStorage - storage Class IDpublic boolean delete()
Entry
delete in interface Entrypublic boolean renameTo(java.lang.String newName)
Entry
renameTo in interface EntrynewName - the new name for this Entry
public java.lang.String getName()
Entry
getName in interface Entrypublic DirectoryEntry getParent()
Entry
getParent in interface Entrypublic boolean isDirectoryEntry()
Entry
isDirectoryEntry in interface Entrypublic boolean isDocumentEntry()
Entry
isDocumentEntry in interface Entry
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||