public class PSTFile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static boolean |
bCPFirstTime |
private static boolean |
bFirstTime |
private java.util.LinkedHashMap<java.lang.Integer,java.util.LinkedList<DescriptorIndexNode>> |
childrenDescriptorTree |
static int |
ENCRYPTION_TYPE_COMPRESSIBLE |
static int |
ENCRYPTION_TYPE_NONE |
private int |
encryptionType |
private java.util.HashMap<java.util.UUID,java.lang.Integer> |
guidMap |
private byte[] |
guids |
private static java.lang.String[] |
guidStrings |
private static java.util.HashMap<java.lang.Integer,java.lang.Long> |
idToName |
private java.util.HashMap<java.lang.Integer,java.lang.String> |
idToString |
private PSTFileContent |
in |
private int |
itemCount |
private static int |
MESSAGE_STORE_DESCRIPTOR_IDENTIFIER |
private java.util.HashMap<java.lang.Long,java.lang.Integer> |
nameToId |
private static java.util.Properties |
propertyInternetCodePages |
private static java.util.Properties |
propertyNames |
static int |
PS_INTERNET_HEADERS |
static int |
PS_MAPI |
static int |
PS_PUBLIC_STRINGS |
static int |
PSETID_Address |
static int |
PSETID_AirSync |
static int |
PSETID_Appointment |
static int |
PSETID_Common |
static int |
PSETID_Log |
static int |
PSETID_Meeting |
static int |
PSETID_Messaging |
static int |
PSETID_Note |
static int |
PSETID_PostRss |
static int |
PSETID_Sharing |
static int |
PSETID_Task |
static int |
PSETID_UnifiedMessaging |
static int |
PST_TYPE_2013_UNICODE |
static int |
PST_TYPE_ANSI |
protected static int |
PST_TYPE_ANSI_2 |
static int |
PST_TYPE_UNICODE |
private int |
pstFileType |
private static int |
ROOT_FOLDER_DESCRIPTOR_IDENTIFIER |
private java.util.HashMap<java.lang.String,java.lang.Integer> |
stringToId |
Constructor and Description |
---|
PSTFile(byte[] bytes) |
PSTFile(java.io.File file) |
PSTFile(PSTFileContent content) |
PSTFile(java.lang.String fileName)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected long |
extractLEFileOffset(long startOffset)
Read a file offset from the file
PST Files have this tendency to store file offsets (pointers) in 8 little
endian bytes.
|
protected void |
finalize()
destructor just closes the file handle...
|
private byte[] |
findBtreeItem(PSTFileContent in,
long index,
boolean descTree)
Generic function used by getOffsetIndexNode and getDescriptorIndexNode
for navigating the PST B-Trees
|
(package private) java.util.LinkedHashMap<java.lang.Integer,java.util.LinkedList<DescriptorIndexNode>> |
getChildDescriptorTree()
Build the children descriptor tree
This goes through the entire descriptor B-Tree and adds every item to the
childrenDescriptorTree.
|
PSTFileContent |
getContentHandle()
get the handle to the file content we are currently accessing
|
private byte[] |
getData(PSTTableItem item,
java.util.HashMap<java.lang.Integer,PSTDescriptorItem> localDescriptorItems) |
(package private) DescriptorIndexNode |
getDescriptorIndexNode(long identifier)
navigate the internal descriptor B-Tree and find a specific item
|
int |
getEncryptionType()
get the type of encryption the file uses
|
java.io.RandomAccessFile |
getFileHandle()
get the handle to the RandomAccessFile we are currently accessing (if
any)
|
(package private) static java.lang.String |
getInternetCodePageCharset(int propertyId) |
int |
getLeafSize(long bid) |
PSTMessageStore |
getMessageStore()
get the message store of the PST file.
|
(package private) int |
getNameToIdMapItem(int key,
int propertySetIndex) |
(package private) static long |
getNameToIdMapKey(int id) |
(package private) OffsetIndexItem |
getOffsetIndexNode(long identifier)
navigate the internal index B-Tree and find a specific item
|
(package private) static java.lang.String |
getPropertyDescription(int entryType,
int entryValueType) |
(package private) static java.lang.String |
getPropertyName(int propertyId,
boolean bNamed) |
(package private) java.util.HashMap<java.lang.Integer,PSTDescriptorItem> |
getPSTDescriptorItems(long localDescriptorsOffsetIndexIdentifier)
parse a PSTDescriptor and get all of its items
|
(package private) java.util.HashMap<java.lang.Integer,PSTDescriptorItem> |
getPSTDescriptorItems(PSTNodeInputStream in) |
int |
getPSTFileType() |
(package private) int |
getPublicStringToIdMapItem(java.lang.String key) |
PSTFolder |
getRootFolder()
get the root folder for the PST file.
|
private void |
processDescriptorBTree(long btreeStartOffset)
Recursive function for building the descriptor tree, used by
buildDescriptorTree
|
private void |
processNameToIdMap(PSTFileContent in)
read the name-to-id map from the file and load it in
|
(package private) PSTNodeInputStream |
readLeaf(long bid) |
public static final int ENCRYPTION_TYPE_NONE
public static final int ENCRYPTION_TYPE_COMPRESSIBLE
private static final int MESSAGE_STORE_DESCRIPTOR_IDENTIFIER
private static final int ROOT_FOLDER_DESCRIPTOR_IDENTIFIER
public static final int PST_TYPE_ANSI
protected static final int PST_TYPE_ANSI_2
public static final int PST_TYPE_UNICODE
public static final int PST_TYPE_2013_UNICODE
public static final int PS_PUBLIC_STRINGS
public static final int PSETID_Common
public static final int PSETID_Address
public static final int PS_INTERNET_HEADERS
public static final int PSETID_Appointment
public static final int PSETID_Meeting
public static final int PSETID_Log
public static final int PSETID_Messaging
public static final int PSETID_Note
public static final int PSETID_PostRss
public static final int PSETID_Task
public static final int PSETID_UnifiedMessaging
public static final int PS_MAPI
public static final int PSETID_AirSync
public static final int PSETID_Sharing
private static final java.lang.String[] guidStrings
private final java.util.HashMap<java.util.UUID,java.lang.Integer> guidMap
private int encryptionType
private java.util.LinkedHashMap<java.lang.Integer,java.util.LinkedList<DescriptorIndexNode>> childrenDescriptorTree
private final java.util.HashMap<java.lang.Long,java.lang.Integer> nameToId
private final java.util.HashMap<java.lang.String,java.lang.Integer> stringToId
private static java.util.HashMap<java.lang.Integer,java.lang.Long> idToName
private final java.util.HashMap<java.lang.Integer,java.lang.String> idToString
private byte[] guids
private int itemCount
private final PSTFileContent in
private int pstFileType
private static java.util.Properties propertyInternetCodePages
private static boolean bCPFirstTime
private static java.util.Properties propertyNames
private static boolean bFirstTime
public PSTFile(java.lang.String fileName) throws java.io.FileNotFoundException, PSTException, java.io.IOException
fileName
- java.io.FileNotFoundException
PSTException
java.io.IOException
public PSTFile(java.io.File file) throws java.io.FileNotFoundException, PSTException, java.io.IOException
java.io.FileNotFoundException
PSTException
java.io.IOException
public PSTFile(byte[] bytes) throws java.io.FileNotFoundException, PSTException, java.io.IOException
java.io.FileNotFoundException
PSTException
java.io.IOException
public PSTFile(PSTFileContent content) throws java.io.FileNotFoundException, PSTException, java.io.IOException
java.io.FileNotFoundException
PSTException
java.io.IOException
public int getPSTFileType()
private void processNameToIdMap(PSTFileContent in) throws java.io.IOException, PSTException
in
- java.io.IOException
PSTException
private byte[] getData(PSTTableItem item, java.util.HashMap<java.lang.Integer,PSTDescriptorItem> localDescriptorItems) throws java.io.IOException, PSTException
java.io.IOException
PSTException
int getNameToIdMapItem(int key, int propertySetIndex)
int getPublicStringToIdMapItem(java.lang.String key)
static long getNameToIdMapKey(int id)
static java.lang.String getInternetCodePageCharset(int propertyId)
static java.lang.String getPropertyName(int propertyId, boolean bNamed)
static java.lang.String getPropertyDescription(int entryType, int entryValueType)
protected void finalize() throws java.io.IOException
finalize
in class java.lang.Object
java.io.IOException
public int getEncryptionType()
public java.io.RandomAccessFile getFileHandle()
public PSTFileContent getContentHandle()
public PSTMessageStore getMessageStore() throws PSTException, java.io.IOException
PSTException
java.io.IOException
public PSTFolder getRootFolder() throws PSTException, java.io.IOException
PSTException
java.io.IOException
PSTNodeInputStream readLeaf(long bid) throws java.io.IOException, PSTException
java.io.IOException
PSTException
public int getLeafSize(long bid) throws java.io.IOException, PSTException
java.io.IOException
PSTException
protected long extractLEFileOffset(long startOffset) throws java.io.IOException
in
- handle for PST filestartOffset
- where to read the 8 bytes fromjava.io.IOException
private byte[] findBtreeItem(PSTFileContent in, long index, boolean descTree) throws java.io.IOException, PSTException
in
- index
- descTree
- java.io.IOException
PSTException
DescriptorIndexNode getDescriptorIndexNode(long identifier) throws java.io.IOException, PSTException
in
- identifier
- java.io.IOException
PSTException
OffsetIndexItem getOffsetIndexNode(long identifier) throws java.io.IOException, PSTException
in
- identifier
- java.io.IOException
PSTException
java.util.HashMap<java.lang.Integer,PSTDescriptorItem> getPSTDescriptorItems(long localDescriptorsOffsetIndexIdentifier) throws PSTException, java.io.IOException
PSTException
java.io.IOException
java.util.HashMap<java.lang.Integer,PSTDescriptorItem> getPSTDescriptorItems(PSTNodeInputStream in) throws PSTException, java.io.IOException
PSTException
java.io.IOException
java.util.LinkedHashMap<java.lang.Integer,java.util.LinkedList<DescriptorIndexNode>> getChildDescriptorTree() throws java.io.IOException, PSTException
in
- java.io.IOException
PSTException
private void processDescriptorBTree(long btreeStartOffset) throws java.io.IOException, PSTException
in
- btreeStartOffset
- java.io.IOException
PSTException
public void close() throws java.io.IOException
java.io.IOException