Package com.pff
Class PSTObject
java.lang.Object
com.pff.PSTObject
- Direct Known Subclasses:
PSTAttachment,PSTFolder,PSTMessage,PSTMessageStore
PST Object is the root class of all PST Items.
It also provides a number of static utility functions. The most important of which is the
detectAndLoadPSTObject call which allows extraction of a PST Item from the file.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LinkedHashMap<String, HashMap<DescriptorIndexNode, PSTObject>> (package private) static int[]Static stuff below ------------------protected byte[]protected DescriptorIndexNodeprivate static final longThe difference between the Windows epoch (1601-01-01 00:00:00) and the Unix epoch (1970-01-01 00:00:00) in milliseconds: 11644473600000L.protected HashMap<Integer, PSTTableBCItem> protected HashMap<Integer, PSTDescriptorItem> static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected PSTFileprotected PSTTableBC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPSTObject(PSTFile theFile, DescriptorIndexNode descriptorIndexNode) protectedPSTObject(PSTFile theFile, DescriptorIndexNode folderIndexNode, PSTTableBC table, HashMap<Integer, PSTDescriptorItem> localDescriptorItems) for pre-population -
Method Summary
Modifier and TypeMethodDescriptionstatic CalendarapptTimeToCalendar(int minutes) static CalendarapptTimeToUTC(int minutes, PSTTimeZone tz) static longconvertBigEndianBytesToLong(byte[] data, int start, int end) Utility function for converting big endian bytes into a usable java longstatic longconvertLittleEndianBytesToLong(byte[] data) Utility function for converting little endian bytes into a usable java longstatic longconvertLittleEndianBytesToLong(byte[] data, int start, int end) Utility function for converting little endian bytes into a usable java long(package private) static PSTMessagecreateAppropriatePSTMessageObject(PSTFile theFile, DescriptorIndexNode folderIndexNode, PSTTableBC table, HashMap<Integer, PSTDescriptorItem> localDescriptorItems) (package private) static StringcreateJavaString(byte[] data, int stringType, String codepage) protected static byte[]decode(byte[] data) decode a lump of data that has been encrypted with the compressible encryptionstatic PSTObjectdetectAndLoadPSTObject(PSTFile theFile, long descriptorIndex) Detect and load a PST Object from a file with the specified descriptor index(package private) static PSTObjectdetectAndLoadPSTObject(PSTFile theFile, DescriptorIndexNode folderIndexNode) Detect and load a PST Object from a file with the specified descriptor indexprotected static byte[]encode(byte[] data) protected static DatefiletimeToDate(int high, int low) Converts a Windows FILETIME into aDate.Address type Known values are SMTP, EX (Exchange) and UNKNOWNprotected byte[]getBinaryItem(int identifier) protected booleangetBooleanItem(int identifier) protected booleangetBooleanItem(int identifier, boolean defaultValue) CommentCreation timegetDateItem(int identifier) get the descriptor node for this item this identifies the location of the node in the BTree and associated infolongget the descriptor identifier for this item can be used for loading objects through detectAndLoadPSTObject(PSTFile theFile, long descriptorIndex)get the display nameprotected doublegetDoubleItem(int identifier) protected doublegetDoubleItem(int identifier, double defaultValue) E-mail addressprotected intgetIntItem(int identifier) protected intgetIntItem(int identifier, int defaultValue) Modification timeprotected longgetLongItem(int identifier) protected longgetLongItem(int identifier, long defaultValue) intstatic intgetNodeType(int descriptorIdentifier) private Stringprotected StringgetStringItem(int identifier) protected StringgetStringItem(int identifier, int stringType) protected StringgetStringItem(int identifier, int stringType, String codepage) protected PSTTimeZonegetTimeZoneItem(int identifier) (package private) static StringguessPSTObjectType(PSTFile theFile, DescriptorIndexNode folderIndexNode) static voidprintFormattedNumber(long number) static voidprintFormattedNumber(String pref, long number) Output a number in a variety of formats for easier consumptionstatic voidprintHexFormatted(byte[] data, boolean pretty) Output a dump of data in hex format in the order it was read inprotected static voidprintHexFormatted(byte[] data, boolean pretty, int[] indexes) toString()
-
Field Details
-
NID_TYPE_HID
public static final int NID_TYPE_HID- See Also:
-
NID_TYPE_INTERNAL
public static final int NID_TYPE_INTERNAL- See Also:
-
NID_TYPE_NORMAL_FOLDER
public static final int NID_TYPE_NORMAL_FOLDER- See Also:
-
NID_TYPE_SEARCH_FOLDER
public static final int NID_TYPE_SEARCH_FOLDER- See Also:
-
NID_TYPE_NORMAL_MESSAGE
public static final int NID_TYPE_NORMAL_MESSAGE- See Also:
-
NID_TYPE_ATTACHMENT
public static final int NID_TYPE_ATTACHMENT- See Also:
-
NID_TYPE_SEARCH_UPDATE_QUEUE
public static final int NID_TYPE_SEARCH_UPDATE_QUEUE- See Also:
-
NID_TYPE_SEARCH_CRITERIA_OBJECT
public static final int NID_TYPE_SEARCH_CRITERIA_OBJECT- See Also:
-
NID_TYPE_ASSOC_MESSAGE
public static final int NID_TYPE_ASSOC_MESSAGE- See Also:
-
NID_TYPE_CONTENTS_TABLE_INDEX
public static final int NID_TYPE_CONTENTS_TABLE_INDEX- See Also:
-
NID_TYPE_RECEIVE_FOLDER_TABLE
public static final int NID_TYPE_RECEIVE_FOLDER_TABLE- See Also:
-
NID_TYPE_OUTGOING_QUEUE_TABLE
public static final int NID_TYPE_OUTGOING_QUEUE_TABLE- See Also:
-
NID_TYPE_HIERARCHY_TABLE
public static final int NID_TYPE_HIERARCHY_TABLE- See Also:
-
NID_TYPE_CONTENTS_TABLE
public static final int NID_TYPE_CONTENTS_TABLE- See Also:
-
NID_TYPE_ASSOC_CONTENTS_TABLE
public static final int NID_TYPE_ASSOC_CONTENTS_TABLE- See Also:
-
NID_TYPE_SEARCH_CONTENTS_TABLE
public static final int NID_TYPE_SEARCH_CONTENTS_TABLE- See Also:
-
NID_TYPE_ATTACHMENT_TABLE
public static final int NID_TYPE_ATTACHMENT_TABLE- See Also:
-
NID_TYPE_RECIPIENT_TABLE
public static final int NID_TYPE_RECIPIENT_TABLE- See Also:
-
NID_TYPE_SEARCH_TABLE_INDEX
public static final int NID_TYPE_SEARCH_TABLE_INDEX- See Also:
-
NID_TYPE_LTP
public static final int NID_TYPE_LTP- See Also:
-
pstFile
-
data
protected byte[] data -
descriptorIndexNode
-
items
-
localDescriptorItems
-
children
-
table
-
compEnc
static int[] compEncStatic stuff below ------------------ -
EPOCH_DIFF
private static final long EPOCH_DIFFThe difference between the Windows epoch (1601-01-01 00:00:00) and the Unix epoch (1970-01-01 00:00:00) in milliseconds: 11644473600000L. (Use your favorite spreadsheet program to verify the correctness of this value. By the way, did you notice that you can tell from the epochs which operating system is the modern one? :-))
- See Also:
-
-
Constructor Details
-
PSTObject
protected PSTObject(PSTFile theFile, DescriptorIndexNode descriptorIndexNode) throws PSTException, IOException - Throws:
PSTExceptionIOException
-
PSTObject
protected PSTObject(PSTFile theFile, DescriptorIndexNode folderIndexNode, PSTTableBC table, HashMap<Integer, PSTDescriptorItem> localDescriptorItems) for pre-population- Parameters:
theFile-folderIndexNode-table-
-
-
Method Details
-
getItemsString
-
getDescriptorNode
get the descriptor node for this item this identifies the location of the node in the BTree and associated info- Returns:
- item's descriptor node
-
getDescriptorNodeId
public long getDescriptorNodeId()get the descriptor identifier for this item can be used for loading objects through detectAndLoadPSTObject(PSTFile theFile, long descriptorIndex)- Returns:
- item's descriptor node identifier
-
getNodeType
public int getNodeType() -
getNodeType
public static int getNodeType(int descriptorIdentifier) -
getIntItem
protected int getIntItem(int identifier) -
getIntItem
protected int getIntItem(int identifier, int defaultValue) -
getBooleanItem
protected boolean getBooleanItem(int identifier) -
getBooleanItem
protected boolean getBooleanItem(int identifier, boolean defaultValue) -
getDoubleItem
protected double getDoubleItem(int identifier) -
getDoubleItem
protected double getDoubleItem(int identifier, double defaultValue) -
getLongItem
protected long getLongItem(int identifier) -
getLongItem
protected long getLongItem(int identifier, long defaultValue) -
getStringItem
-
getStringItem
-
getStringItem
-
createJavaString
-
getStringCodepage
-
getDateItem
-
getBinaryItem
protected byte[] getBinaryItem(int identifier) -
getTimeZoneItem
-
getMessageClass
-
toString
-
getDisplayName
get the display name -
getAddrType
Address type Known values are SMTP, EX (Exchange) and UNKNOWN -
getEmailAddress
E-mail address -
getComment
Comment -
getCreationTime
Creation time -
getLastModificationTime
Modification time -
printFormattedNumber
Output a number in a variety of formats for easier consumption- Parameters:
data-
-
printFormattedNumber
public static void printFormattedNumber(long number) -
printHexFormatted
public static void printHexFormatted(byte[] data, boolean pretty) Output a dump of data in hex format in the order it was read in- Parameters:
data-pretty-
-
printHexFormatted
protected static void printHexFormatted(byte[] data, boolean pretty, int[] indexes) -
decode
protected static byte[] decode(byte[] data) decode a lump of data that has been encrypted with the compressible encryption- Parameters:
data-- Returns:
- decoded data
-
encode
protected static byte[] encode(byte[] data) -
convertLittleEndianBytesToLong
public static long convertLittleEndianBytesToLong(byte[] data) Utility function for converting little endian bytes into a usable java long- Parameters:
data-- Returns:
- long version of the data
-
convertLittleEndianBytesToLong
public static long convertLittleEndianBytesToLong(byte[] data, int start, int end) Utility function for converting little endian bytes into a usable java long- Parameters:
data-start-end-- Returns:
- long version of the data
-
convertBigEndianBytesToLong
public static long convertBigEndianBytesToLong(byte[] data, int start, int end) Utility function for converting big endian bytes into a usable java long- Parameters:
data-start-end-- Returns:
- long version of the data
-
detectAndLoadPSTObject
public static PSTObject detectAndLoadPSTObject(PSTFile theFile, long descriptorIndex) throws IOException, PSTException Detect and load a PST Object from a file with the specified descriptor index- Parameters:
theFile-descriptorIndex-- Returns:
- PSTObject with that index
- Throws:
IOExceptionPSTException
-
detectAndLoadPSTObject
static PSTObject detectAndLoadPSTObject(PSTFile theFile, DescriptorIndexNode folderIndexNode) throws IOException, PSTException Detect and load a PST Object from a file with the specified descriptor index- Parameters:
theFile-folderIndexNode-- Returns:
- PSTObject with that index
- Throws:
IOExceptionPSTException
-
createAppropriatePSTMessageObject
static PSTMessage createAppropriatePSTMessageObject(PSTFile theFile, DescriptorIndexNode folderIndexNode, PSTTableBC table, HashMap<Integer, PSTDescriptorItem> localDescriptorItems) -
guessPSTObjectType
static String guessPSTObjectType(PSTFile theFile, DescriptorIndexNode folderIndexNode) throws IOException, PSTException - Throws:
IOExceptionPSTException
-
filetimeToDate
Converts a Windows FILETIME into a
Date. The Windows FILETIME structure holds a date and time associated with a file. The structure identifies a 64-bit integer specifying the number of 100-nanosecond intervals which have passed since January 1, 1601. This 64-bit value is split into the two double words stored in the structure.- Parameters:
high- The higher double word of the FILETIME structure.low- The lower double word of the FILETIME structure.- Returns:
- The Windows FILETIME as a
Date.
-
apptTimeToCalendar
-
apptTimeToUTC
-