public class PSTObject
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedHashMap<java.lang.String,java.util.HashMap<DescriptorIndexNode,PSTObject>> |
children |
(package private) static int[] |
compEnc
Static stuff below
------------------
|
protected byte[] |
data |
protected DescriptorIndexNode |
descriptorIndexNode |
private static long |
EPOCH_DIFF
The 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 java.util.HashMap<java.lang.Integer,PSTTableBCItem> |
items |
protected java.util.HashMap<java.lang.Integer,PSTDescriptorItem> |
localDescriptorItems |
static int |
NID_TYPE_ASSOC_CONTENTS_TABLE |
static int |
NID_TYPE_ASSOC_MESSAGE |
static int |
NID_TYPE_ATTACHMENT |
static int |
NID_TYPE_ATTACHMENT_TABLE |
static int |
NID_TYPE_CONTENTS_TABLE |
static int |
NID_TYPE_CONTENTS_TABLE_INDEX |
static int |
NID_TYPE_HID |
static int |
NID_TYPE_HIERARCHY_TABLE |
static int |
NID_TYPE_INTERNAL |
static int |
NID_TYPE_LTP |
static int |
NID_TYPE_NORMAL_FOLDER |
static int |
NID_TYPE_NORMAL_MESSAGE |
static int |
NID_TYPE_OUTGOING_QUEUE_TABLE |
static int |
NID_TYPE_RECEIVE_FOLDER_TABLE |
static int |
NID_TYPE_RECIPIENT_TABLE |
static int |
NID_TYPE_SEARCH_CONTENTS_TABLE |
static int |
NID_TYPE_SEARCH_CRITERIA_OBJECT |
static int |
NID_TYPE_SEARCH_FOLDER |
static int |
NID_TYPE_SEARCH_TABLE_INDEX |
static int |
NID_TYPE_SEARCH_UPDATE_QUEUE |
protected PSTFile |
pstFile |
protected PSTTableBC |
table |
Modifier | Constructor and Description |
---|---|
protected |
PSTObject(PSTFile theFile,
DescriptorIndexNode descriptorIndexNode) |
protected |
PSTObject(PSTFile theFile,
DescriptorIndexNode folderIndexNode,
PSTTableBC table,
java.util.HashMap<java.lang.Integer,PSTDescriptorItem> localDescriptorItems)
for pre-population
|
Modifier and Type | Method and Description |
---|---|
static java.util.Calendar |
apptTimeToCalendar(int minutes) |
static java.util.Calendar |
apptTimeToUTC(int minutes,
PSTTimeZone tz) |
static long |
convertBigEndianBytesToLong(byte[] data,
int start,
int end)
Utility function for converting big endian bytes into a usable java long
|
static long |
convertLittleEndianBytesToLong(byte[] data)
Utility function for converting little endian bytes into a usable java
long
|
static long |
convertLittleEndianBytesToLong(byte[] data,
int start,
int end)
Utility function for converting little endian bytes into a usable java
long
|
(package private) static PSTMessage |
createAppropriatePSTMessageObject(PSTFile theFile,
DescriptorIndexNode folderIndexNode,
PSTTableBC table,
java.util.HashMap<java.lang.Integer,PSTDescriptorItem> localDescriptorItems) |
(package private) static java.lang.String |
createJavaString(byte[] data,
int stringType,
java.lang.String codepage) |
protected static byte[] |
decode(byte[] data)
decode a lump of data that has been encrypted with the compressible
encryption
|
(package private) static PSTObject |
detectAndLoadPSTObject(PSTFile theFile,
DescriptorIndexNode folderIndexNode)
Detect and load a PST Object from a file with the specified descriptor
index
|
static PSTObject |
detectAndLoadPSTObject(PSTFile theFile,
long descriptorIndex)
Detect and load a PST Object from a file with the specified descriptor
index
|
protected static byte[] |
encode(byte[] data) |
protected static java.util.Date |
filetimeToDate(int high,
int low)
Converts a Windows FILETIME into a
Date . |
java.lang.String |
getAddrType()
Address type
Known values are SMTP, EX (Exchange) and UNKNOWN
|
protected byte[] |
getBinaryItem(int identifier) |
protected boolean |
getBooleanItem(int identifier) |
protected boolean |
getBooleanItem(int identifier,
boolean defaultValue) |
java.lang.String |
getComment()
Comment
|
java.util.Date |
getCreationTime()
Creation time
|
java.util.Date |
getDateItem(int identifier) |
DescriptorIndexNode |
getDescriptorNode()
get the descriptor node for this item
this identifies the location of the node in the BTree and associated info
|
long |
getDescriptorNodeId()
get the descriptor identifier for this item
can be used for loading objects through detectAndLoadPSTObject(PSTFile
theFile, long descriptorIndex)
|
java.lang.String |
getDisplayName()
get the display name
|
protected double |
getDoubleItem(int identifier) |
protected double |
getDoubleItem(int identifier,
double defaultValue) |
java.lang.String |
getEmailAddress()
E-mail address
|
protected int |
getIntItem(int identifier) |
protected int |
getIntItem(int identifier,
int defaultValue) |
java.lang.String |
getItemsString() |
java.util.Date |
getLastModificationTime()
Modification time
|
protected long |
getLongItem(int identifier) |
protected long |
getLongItem(int identifier,
long defaultValue) |
java.lang.String |
getMessageClass() |
int |
getNodeType() |
static int |
getNodeType(int descriptorIdentifier) |
private java.lang.String |
getStringCodepage() |
protected java.lang.String |
getStringItem(int identifier) |
protected java.lang.String |
getStringItem(int identifier,
int stringType) |
protected java.lang.String |
getStringItem(int identifier,
int stringType,
java.lang.String codepage) |
protected PSTTimeZone |
getTimeZoneItem(int identifier) |
(package private) static java.lang.String |
guessPSTObjectType(PSTFile theFile,
DescriptorIndexNode folderIndexNode) |
static void |
printFormattedNumber(long number) |
static void |
printFormattedNumber(java.lang.String pref,
long number)
Output a number in a variety of formats for easier consumption
|
static void |
printHexFormatted(byte[] data,
boolean pretty)
Output a dump of data in hex format in the order it was read in
|
protected static void |
printHexFormatted(byte[] data,
boolean pretty,
int[] indexes) |
java.lang.String |
toString() |
public static final int NID_TYPE_HID
public static final int NID_TYPE_INTERNAL
public static final int NID_TYPE_NORMAL_FOLDER
public static final int NID_TYPE_SEARCH_FOLDER
public static final int NID_TYPE_NORMAL_MESSAGE
public static final int NID_TYPE_ATTACHMENT
public static final int NID_TYPE_SEARCH_UPDATE_QUEUE
public static final int NID_TYPE_SEARCH_CRITERIA_OBJECT
public static final int NID_TYPE_ASSOC_MESSAGE
public static final int NID_TYPE_CONTENTS_TABLE_INDEX
public static final int NID_TYPE_RECEIVE_FOLDER_TABLE
public static final int NID_TYPE_OUTGOING_QUEUE_TABLE
public static final int NID_TYPE_HIERARCHY_TABLE
public static final int NID_TYPE_CONTENTS_TABLE
public static final int NID_TYPE_ASSOC_CONTENTS_TABLE
public static final int NID_TYPE_SEARCH_CONTENTS_TABLE
public static final int NID_TYPE_ATTACHMENT_TABLE
public static final int NID_TYPE_RECIPIENT_TABLE
public static final int NID_TYPE_SEARCH_TABLE_INDEX
public static final int NID_TYPE_LTP
protected PSTFile pstFile
protected byte[] data
protected DescriptorIndexNode descriptorIndexNode
protected java.util.HashMap<java.lang.Integer,PSTTableBCItem> items
protected java.util.HashMap<java.lang.Integer,PSTDescriptorItem> localDescriptorItems
protected java.util.LinkedHashMap<java.lang.String,java.util.HashMap<DescriptorIndexNode,PSTObject>> children
protected PSTTableBC table
static int[] compEnc
private static final long EPOCH_DIFF
The 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? :-))
protected PSTObject(PSTFile theFile, DescriptorIndexNode descriptorIndexNode) throws PSTException, java.io.IOException
PSTException
java.io.IOException
protected PSTObject(PSTFile theFile, DescriptorIndexNode folderIndexNode, PSTTableBC table, java.util.HashMap<java.lang.Integer,PSTDescriptorItem> localDescriptorItems)
theFile
- folderIndexNode
- table
- public java.lang.String getItemsString()
public DescriptorIndexNode getDescriptorNode()
public long getDescriptorNodeId()
public int getNodeType()
public static int getNodeType(int descriptorIdentifier)
protected int getIntItem(int identifier)
protected int getIntItem(int identifier, int defaultValue)
protected boolean getBooleanItem(int identifier)
protected boolean getBooleanItem(int identifier, boolean defaultValue)
protected double getDoubleItem(int identifier)
protected double getDoubleItem(int identifier, double defaultValue)
protected long getLongItem(int identifier)
protected long getLongItem(int identifier, long defaultValue)
protected java.lang.String getStringItem(int identifier)
protected java.lang.String getStringItem(int identifier, int stringType)
protected java.lang.String getStringItem(int identifier, int stringType, java.lang.String codepage)
static java.lang.String createJavaString(byte[] data, int stringType, java.lang.String codepage)
private java.lang.String getStringCodepage()
public java.util.Date getDateItem(int identifier)
protected byte[] getBinaryItem(int identifier)
protected PSTTimeZone getTimeZoneItem(int identifier)
public java.lang.String getMessageClass()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDisplayName()
public java.lang.String getAddrType()
public java.lang.String getEmailAddress()
public java.lang.String getComment()
public java.util.Date getCreationTime()
public java.util.Date getLastModificationTime()
public static void printFormattedNumber(java.lang.String pref, long number)
data
- public static void printFormattedNumber(long number)
public static void printHexFormatted(byte[] data, boolean pretty)
data
- pretty
- protected static void printHexFormatted(byte[] data, boolean pretty, int[] indexes)
protected static byte[] decode(byte[] data)
data
- protected static byte[] encode(byte[] data)
public static long convertLittleEndianBytesToLong(byte[] data)
data
- public static long convertLittleEndianBytesToLong(byte[] data, int start, int end)
data
- start
- end
- public static long convertBigEndianBytesToLong(byte[] data, int start, int end)
data
- start
- end
- public static PSTObject detectAndLoadPSTObject(PSTFile theFile, long descriptorIndex) throws java.io.IOException, PSTException
theFile
- descriptorIndex
- java.io.IOException
PSTException
static PSTObject detectAndLoadPSTObject(PSTFile theFile, DescriptorIndexNode folderIndexNode) throws java.io.IOException, PSTException
theFile
- folderIndexNode
- java.io.IOException
PSTException
static PSTMessage createAppropriatePSTMessageObject(PSTFile theFile, DescriptorIndexNode folderIndexNode, PSTTableBC table, java.util.HashMap<java.lang.Integer,PSTDescriptorItem> localDescriptorItems)
static java.lang.String guessPSTObjectType(PSTFile theFile, DescriptorIndexNode folderIndexNode) throws java.io.IOException, PSTException
java.io.IOException
PSTException
protected static java.util.Date filetimeToDate(int high, int low)
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.
high
- The higher double word of the FILETIME structure.low
- The lower double word of the FILETIME structure.Date
.public static java.util.Calendar apptTimeToCalendar(int minutes)
public static java.util.Calendar apptTimeToUTC(int minutes, PSTTimeZone tz)