Interface DirectoryEntry

    • Method Detail

      • getEntries

        Iterator<Entry> getEntries()
        get an iterator of the Entry instances contained directly in this instance (in other words, children only; no grandchildren etc.)
        Returns:
        iterator; never null, but hasNext() may return false immediately (i.e., this DirectoryEntry is empty). All objects retrieved by next() are guaranteed to be implementations of Entry.
      • getEntryNames

        Set<String> getEntryNames()
        get the names of all the Entries contained directly in this instance (in other words, names of children only; no grandchildren etc).
        Returns:
        the names of all the entries that may be retrieved with getEntry(String), which may be empty (if this DirectoryEntry is empty)
      • isEmpty

        boolean isEmpty()
        is this DirectoryEntry empty?
        Returns:
        true if this instance contains no Entry instances
      • getEntryCount

        int getEntryCount()
        find out how many Entry instances are contained directly within this DirectoryEntry
        Returns:
        number of immediately (no grandchildren etc.) contained Entry instances
      • hasEntry

        boolean hasEntry​(String name)
        Checks if entry with specified name present, case sensitive
      • hasEntryCaseInsensitive

        boolean hasEntryCaseInsensitive​(String name)
        Checks if entry with specified name present, case sensitive
      • getEntry

        Entry getEntry​(String name)
                throws FileNotFoundException
        get a specified Entry by name, case sensitive
        Parameters:
        name - the name of the Entry to obtain.
        Returns:
        the specified Entry, if it is directly contained in this DirectoryEntry
        Throws:
        FileNotFoundException - if no Entry with the specified name exists in this DirectoryEntry
      • getEntryCaseInsensitive

        Entry getEntryCaseInsensitive​(String name)
                               throws FileNotFoundException
        get a specified Entry by name, case insensitive
        Parameters:
        name - the name of the Entry to obtain.
        Returns:
        the specified Entry, if it is directly contained in this DirectoryEntry
        Throws:
        FileNotFoundException - if no Entry with the specified name exists in this DirectoryEntry
      • createDocument

        DocumentEntry createDocument​(String name,
                                     InputStream stream)
                              throws IOException
        create a new DocumentEntry
        Parameters:
        name - the name of the new DocumentEntry
        stream - the InputStream from which to create the new DocumentEntry
        Returns:
        the new DocumentEntry
        Throws:
        IOException
      • createDocument

        DocumentEntry createDocument​(String name,
                                     int size,
                                     POIFSWriterListener writer)
                              throws IOException
        create a new DocumentEntry; the data will be provided later
        Parameters:
        name - the name of the new DocumentEntry
        size - the size of the new DocumentEntry
        writer - the writer of the new DocumentEntry
        Returns:
        the new DocumentEntry
        Throws:
        IOException
      • createDirectory

        DirectoryEntry createDirectory​(String name)
                                throws IOException
        create a new DirectoryEntry
        Parameters:
        name - the name of the new DirectoryEntry
        Returns:
        the new DirectoryEntry
        Throws:
        IOException
      • getStorageClsid

        ClassID getStorageClsid()
        Gets the storage clsid of the directory entry
        Returns:
        storage Class ID
      • setStorageClsid

        void setStorageClsid​(ClassID clsidStorage)
        Sets the storage clsid for the directory entry
        Parameters:
        clsidStorage - storage Class ID