Package com.pff
Class PSTFolder
java.lang.Object
com.pff.PSTObject
com.pff.PSTFolder
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
FieldsModifier and TypeFieldDescriptionprivate intinternal vars for the tracking of things..private PSTTable7Cprivate LinkedList<DescriptorIndexNode> private LinkedHashSet<DescriptorIndexNode> private PSTTable7CFields inherited from class com.pff.PSTObject
children, compEnc, 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 -
Constructor Summary
ConstructorsConstructorDescriptionPSTFolder(PSTFile theFile, DescriptorIndexNode descriptorIndexNode) a constructor for the rest of us...PSTFolder(PSTFile theFile, DescriptorIndexNode folderIndexNode, PSTTableBC table, HashMap<Integer, PSTDescriptorItem> localDescriptorItems) For pre-populating a folder object with values. -
Method Summary
Modifier and TypeMethodDescriptionintgetChildren(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.intContainer flags Integer 32-bit signedintthe number of emails in this folder this is as reported by the PST file, for a number calculated by the library use getEmailCountintthe number of emails in this folder this is the count of emails made by the library and will therefore should be more accurate than getContentCountGet the next child of this folder As there could be thousands of emails, we have these kind of cursor operationsintthe number of child folders in this folderget all of the sub folders...intAmount of unread content items Integer 32-bit signedbooleandoes this folder have subfolders once again, read from the PST, use getSubFolderCount if you want to know what the library makes of it allprivate voidthis method goes through all of the children and sorts them into one of the three hash sets.private voidvoidmoveChildCursorTo(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, createAppropriatePSTMessageObject, createJavaString, decode, detectAndLoadPSTObject, 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, guessPSTObjectType, printFormattedNumber, printFormattedNumber, printHexFormatted, printHexFormatted, toString
-
Field Details
-
currentEmailIndex
private int currentEmailIndexinternal vars for the tracking of things.. -
otherItems
-
emailsTable
-
fallbackEmailsTable
-
subfoldersTable
-
-
Constructor Details
-
PSTFolder
PSTFolder(PSTFile theFile, DescriptorIndexNode descriptorIndexNode) throws PSTException, IOException a constructor for the rest of us...- Parameters:
theFile-descriptorIndexNode-- Throws:
PSTExceptionIOException
-
PSTFolder
PSTFolder(PSTFile theFile, DescriptorIndexNode folderIndexNode, PSTTableBC table, HashMap<Integer, PSTDescriptorItem> localDescriptorItems) For pre-populating a folder object with values. Not recommended for use outside this library- Parameters:
theFile-folderIndexNode-table-
-
-
Method Details
-
getSubFolders
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:
PSTExceptionIOException
-
initSubfoldersTable
- Throws:
IOExceptionPSTException
-
initEmailsTable
this method goes through all of the children and sorts them into one of the three hash sets.- Throws:
PSTExceptionIOException
-
getChildren
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:
PSTExceptionIOException
-
getChildDescriptorNodes
- Throws:
PSTExceptionIOException
-
getNextChild
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:
PSTExceptionIOException
-
moveChildCursorTo
move the internal folder cursor to the desired position position 0 is before the first record.- Parameters:
newIndex-- Throws:
IOExceptionPSTException
-
getSubFolderCount
the number of child folders in this folder- Returns:
- number of subfolders as counted
- Throws:
IOExceptionPSTException
-
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:
IOExceptionPSTException- 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
-
getAssociateContentCount
public int getAssociateContentCount() -
getContainerFlags
public int getContainerFlags()Container flags Integer 32-bit signed
-