com.pff
Class PSTFolder

java.lang.Object
  extended by com.pff.PSTObject
      extended by com.pff.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 Summary
 
Fields inherited from class com.pff.PSTObject
children, data, descriptorIndexNode, items, localDescriptorItems, NID_TYPE_ASSOC_CONTENTS_TABLE, NID_TYPE_ASSOC_MESSAGE, NID_TYPE_ATTACHMENT, NID_TYPE_ATTACHMENT_TABLE, NID_TYPE_CONTENTS_TABLE, NID_TYPE_CONTENTS_TABLE_INDEX, NID_TYPE_HID, NID_TYPE_HIERARCHY_TABLE, NID_TYPE_INTERNAL, NID_TYPE_LTP, NID_TYPE_NORMAL_FOLDER, NID_TYPE_NORMAL_MESSAGE, NID_TYPE_OUTGOING_QUEUE_TABLE, NID_TYPE_RECEIVE_FOLDER_TABLE, NID_TYPE_RECIPIENT_TABLE, NID_TYPE_SEARCH_CONTENTS_TABLE, NID_TYPE_SEARCH_CRITERIA_OBJECT, NID_TYPE_SEARCH_FOLDER, NID_TYPE_SEARCH_TABLE_INDEX, NID_TYPE_SEARCH_UPDATE_QUEUE, pstFile, table
 
Method Summary
 int getAssociateContentCount()
           
 java.util.LinkedList<java.lang.Integer> getChildDescriptorNodes()
           
 java.util.Vector<PSTObject> getChildren(int numberToReturn)
          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.
 java.lang.String getContainerClass()
           
 int getContainerFlags()
          Container flags Integer 32-bit signed
 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
 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
 PSTObject getNextChild()
          Get the next child of this folder As there could be thousands of emails, we have these kind of cursor operations
 int getSubFolderCount()
          the number of child folders in this folder
 java.util.Vector<PSTFolder> getSubFolders()
          get all of the sub folders...
 int getUnreadCount()
          Amount of unread content items Integer 32-bit signed
 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
 void moveChildCursorTo(int newIndex)
          move the internal folder cursor to the desired position position 0 is before the first record.
 
Methods inherited from class com.pff.PSTObject
apptTimeToCalendar, apptTimeToUTC, convertBigEndianBytesToLong, convertLittleEndianBytesToLong, convertLittleEndianBytesToLong, decode, detectAndLoadPSTObject, encode, filetimeToDate, getAddrType, getBinaryItem, getBooleanItem, getBooleanItem, getComment, getCreationTime, getDateItem, getDescriptorNode, getDescriptorNodeId, getDisplayName, getDoubleItem, getDoubleItem, getEmailAddress, getIntItem, getIntItem, getItemsString, getLastModificationTime, getLongItem, getLongItem, getMessageClass, getNodeType, getNodeType, getStringItem, getStringItem, getStringItem, getTimeZoneItem, printHexFormatted, printHexFormatted, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

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