Package com.pff

Class PSTFolder


  • public class PSTFolder
    extends PSTObject
    Represents a folder in the PST File Allows you to access child folders or items. Items are accessed through a sort of cursor arrangement. This allows for incremental reading of a folder which may have _lots_ of emails.
    • Field Detail

      • currentEmailIndex

        private int currentEmailIndex
        internal vars for the tracking of things..
      • subfoldersTable

        private PSTTable7C subfoldersTable
    • Constructor Detail

      • PSTFolder

        PSTFolder​(PSTFile theFile,
                  DescriptorIndexNode folderIndexNode,
                  PSTTableBC table,
                  java.util.HashMap<java.lang.Integer,​PSTDescriptorItem> localDescriptorItems)
        For pre-populating a folder object with values. Not recommended for use outside this library
        Parameters:
        theFile -
        folderIndexNode -
        table -
    • Method Detail

      • getSubFolders

        public java.util.Vector<PSTFolder> getSubFolders()
                                                  throws PSTException,
                                                         java.io.IOException
        get all of the sub folders... there are not usually thousands, so we just do it in one big operation.
        Returns:
        all of the subfolders
        Throws:
        PSTException
        java.io.IOException
      • initSubfoldersTable

        private void initSubfoldersTable()
                                  throws java.io.IOException,
                                         PSTException
        Throws:
        java.io.IOException
        PSTException
      • initEmailsTable

        private void initEmailsTable()
                              throws PSTException,
                                     java.io.IOException
        this method goes through all of the children and sorts them into one of the three hash sets.
        Throws:
        PSTException
        java.io.IOException
      • getChildren

        public java.util.Vector<PSTObject> getChildren​(int numberToReturn)
                                                throws PSTException,
                                                       java.io.IOException
        get some children from the folder This is implemented as a cursor of sorts, as there could be thousands and that is just too many to process at once.
        Parameters:
        numberToReturn -
        Returns:
        bunch of children in this folder
        Throws:
        PSTException
        java.io.IOException
      • getChildDescriptorNodes

        public java.util.LinkedList<java.lang.Integer> getChildDescriptorNodes()
                                                                        throws PSTException,
                                                                               java.io.IOException
        Throws:
        PSTException
        java.io.IOException
      • getNextChild

        public PSTObject getNextChild()
                               throws PSTException,
                                      java.io.IOException
        Get the next child of this folder As there could be thousands of emails, we have these kind of cursor operations
        Returns:
        the next email in the folder or null if at the end of the folder
        Throws:
        PSTException
        java.io.IOException
      • moveChildCursorTo

        public void moveChildCursorTo​(int newIndex)
                               throws java.io.IOException,
                                      PSTException
        move the internal folder cursor to the desired position position 0 is before the first record.
        Parameters:
        newIndex -
        Throws:
        java.io.IOException
        PSTException
      • getSubFolderCount

        public int getSubFolderCount()
                              throws java.io.IOException,
                                     PSTException
        the number of child folders in this folder
        Returns:
        number of subfolders as counted
        Throws:
        java.io.IOException
        PSTException
      • getFolderType

        public int getFolderType()
        the number of emails in this folder this is the count of emails made by the library and will therefore should be more accurate than getContentCount
        Returns:
        number of emails in this folder (as counted)
        Throws:
        java.io.IOException
        PSTException - public int getEmailCount() throws IOException, PSTException { this.initEmailsTable(); return this.emailsTable.getRowCount(); }
      • getContentCount

        public int getContentCount()
        the number of emails in this folder this is as reported by the PST file, for a number calculated by the library use getEmailCount
        Returns:
        number of items as reported by PST File
      • getUnreadCount

        public int getUnreadCount()
        Amount of unread content items Integer 32-bit signed
      • hasSubfolders

        public boolean hasSubfolders()
        does this folder have subfolders once again, read from the PST, use getSubFolderCount if you want to know what the library makes of it all
        Returns:
        has subfolders as reported by the PST File
      • getContainerClass

        public java.lang.String getContainerClass()
      • getAssociateContentCount

        public int getAssociateContentCount()
      • getContainerFlags

        public int getContainerFlags()
        Container flags Integer 32-bit signed