import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
+import java.util.Set;
import org.apache.poi.hpsf.ClassID;
*/
public Iterator<Entry> getEntries();
+
+ /**
+ * get the names of all the Entries contained directly in this
+ * instance (in other words, names of children only; no grandchildren
+ * etc).
+ *
+ * @return the names of all the entries that may be retrieved with
+ * getEntry(String), which may be empty (if this
+ * DirectoryEntry is empty)
+ */
+ public Set<String> getEntryNames();
/**
* is this DirectoryEntry empty?
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.apache.poi.hpsf.ClassID;
import org.apache.poi.poifs.dev.POIFSViewable;
{
return _entries.iterator();
}
+
+ /**
+ * get the names of all the Entries contained directly in this
+ * instance (in other words, names of children only; no grandchildren
+ * etc).
+ *
+ * @return the names of all the entries that may be retrieved with
+ * getEntry(String), which may be empty (if this
+ * DirectoryEntry is empty)
+ */
+ public Set<String> getEntryNames()
+ {
+ return _byname.keySet();
+ }
/**
* is this DirectoryEntry empty?
}
return size;
}
+
+ public Set<String> getEntryNames() {
+ Set<String> names = new HashSet<String>();
+ for (String name : directory.getEntryNames()) {
+ if (!excludes.contains(name)) {
+ names.add(name);
+ }
+ }
+ return names;
+ }
public boolean isEmpty() {
return (getEntryCount() == 0);