Methods Summary |
---|
boolean | changeName(java.lang.String oldName, java.lang.String newName)Change a contained Entry's name
boolean rval = false;
EntryNode child = ( EntryNode ) _entries.get(oldName);
if (child != null)
{
rval = (( DirectoryProperty ) getProperty())
.changeName(child.getProperty(), newName);
if (rval)
{
_entries.remove(oldName);
_entries.put(child.getProperty().getName(), child);
}
}
return rval;
|
public org.apache.poi.poifs.filesystem.DirectoryEntry | createDirectory(java.lang.String name)create a new DirectoryEntry
DirectoryProperty property = new DirectoryProperty(name);
DirectoryNode rval = new DirectoryNode(property, _filesystem,
this);
(( DirectoryProperty ) getProperty()).addChild(property);
_filesystem.addDirectory(property);
_entries.put(name, rval);
return rval;
|
public org.apache.poi.poifs.filesystem.DocumentEntry | createDocument(java.lang.String name, java.io.InputStream stream)create a new DocumentEntry
return createDocument(new POIFSDocument(name, stream));
|
public org.apache.poi.poifs.filesystem.DocumentEntry | createDocument(java.lang.String name, int size, org.apache.poi.poifs.filesystem.POIFSWriterListener writer)create a new DocumentEntry; the data will be provided later
return createDocument(new POIFSDocument(name, size, _path, writer));
|
org.apache.poi.poifs.filesystem.DocumentEntry | createDocument(org.apache.poi.poifs.filesystem.POIFSDocument document)create a new DocumentEntry
DocumentProperty property = document.getDocumentProperty();
DocumentNode rval = new DocumentNode(property, this);
(( DirectoryProperty ) getProperty()).addChild(property);
_filesystem.addDocument(document);
_entries.put(property.getName(), rval);
return rval;
|
boolean | deleteEntry(org.apache.poi.poifs.filesystem.EntryNode entry)Delete an entry
boolean rval =
(( DirectoryProperty ) getProperty())
.deleteChild(entry.getProperty());
if (rval)
{
_entries.remove(entry.getName());
_filesystem.remove(entry);
}
return rval;
|
public java.util.Iterator | getEntries()get an iterator of the Entry instances contained directly in
this instance (in other words, children only; no grandchildren
etc.)
return _entries.values().iterator();
|
public org.apache.poi.poifs.filesystem.Entry | getEntry(java.lang.String name)get a specified Entry by name
Entry rval = null;
if (name != null)
{
rval = ( Entry ) _entries.get(name);
}
if (rval == null)
{
// either a null name was given, or there is no such name
throw new FileNotFoundException("no such entry: \"" + name
+ "\"");
}
return rval;
|
public int | getEntryCount()find out how many Entry instances are contained directly within
this DirectoryEntry
return _entries.size();
|
public org.apache.poi.poifs.filesystem.POIFSDocumentPath | getPath()
return _path;
|
public java.lang.String | getShortDescription()Provides a short description of the object, to be used when a
POIFSViewable object has not provided its contents.
return getName();
|
public org.apache.poi.hpsf.ClassID | getStorageClsid()Gets the storage clsid of the directory entry
return getProperty().getStorageClsid();
|
public java.lang.Object[] | getViewableArray()Get an array of objects, some of which may implement
POIFSViewable
return new Object[ 0 ];
|
public java.util.Iterator | getViewableIterator()Get an Iterator of objects, some of which may implement
POIFSViewable
List components = new ArrayList();
components.add(getProperty());
SortedMap sortedEntries = new TreeMap(_entries);
Iterator iter = sortedEntries.values().iterator();
while (iter.hasNext())
{
components.add(iter.next());
}
return components.iterator();
|
protected boolean | isDeleteOK()extensions use this method to verify internal rules regarding
deletion of the underlying store.
// if this directory is empty, we can delete it
return isEmpty();
|
public boolean | isDirectoryEntry()is this a DirectoryEntry?
return true;
|
public boolean | isEmpty()is this DirectoryEntry empty?
return _entries.isEmpty();
|
public boolean | preferArray()Give viewers a hint as to whether to call getViewableArray or
getViewableIterator
return false;
|
public void | setStorageClsid(org.apache.poi.hpsf.ClassID clsidStorage)Sets the storage clsid for the directory entry
getProperty().setStorageClsid(clsidStorage);
|