com.pff
Class PSTFile

java.lang.Object
  extended by com.pff.PSTFile

public class PSTFile
extends java.lang.Object

PSTFile is the containing class that allows you to access items within a .pst file. Start here, get the root of the folders and work your way down through your items.


Field Summary
static int ENCRYPTION_TYPE_COMPRESSIBLE
           
static int ENCRYPTION_TYPE_NONE
           
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_ANSI
           
protected static int PST_TYPE_ANSI_2
           
static int PST_TYPE_UNICODE
           
 
Constructor Summary
PSTFile(java.io.File fileName)
           
PSTFile(java.lang.String fileName)
          constructor
 
Method Summary
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...
 int getEncryptionType()
          get the type of encryption the file uses
 java.io.RandomAccessFile getFileHandle()
          get the handle to the file we are currently accessing
 int getLeafSize(long bid)
           
 PSTMessageStore getMessageStore()
          get the message store of the PST file.
 int getPSTFileType()
           
 PSTFolder getRootFolder()
          get the root folder for the PST file.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCRYPTION_TYPE_NONE

public static final int ENCRYPTION_TYPE_NONE
See Also:
Constant Field Values

ENCRYPTION_TYPE_COMPRESSIBLE

public static final int ENCRYPTION_TYPE_COMPRESSIBLE
See Also:
Constant Field Values

PST_TYPE_ANSI

public static final int PST_TYPE_ANSI
See Also:
Constant Field Values

PST_TYPE_ANSI_2

protected static final int PST_TYPE_ANSI_2
See Also:
Constant Field Values

PST_TYPE_UNICODE

public static final int PST_TYPE_UNICODE
See Also:
Constant Field Values

PS_PUBLIC_STRINGS

public static final int PS_PUBLIC_STRINGS
See Also:
Constant Field Values

PSETID_Common

public static final int PSETID_Common
See Also:
Constant Field Values

PSETID_Address

public static final int PSETID_Address
See Also:
Constant Field Values

PS_INTERNET_HEADERS

public static final int PS_INTERNET_HEADERS
See Also:
Constant Field Values

PSETID_Appointment

public static final int PSETID_Appointment
See Also:
Constant Field Values

PSETID_Meeting

public static final int PSETID_Meeting
See Also:
Constant Field Values

PSETID_Log

public static final int PSETID_Log
See Also:
Constant Field Values

PSETID_Messaging

public static final int PSETID_Messaging
See Also:
Constant Field Values

PSETID_Note

public static final int PSETID_Note
See Also:
Constant Field Values

PSETID_PostRss

public static final int PSETID_PostRss
See Also:
Constant Field Values

PSETID_Task

public static final int PSETID_Task
See Also:
Constant Field Values

PSETID_UnifiedMessaging

public static final int PSETID_UnifiedMessaging
See Also:
Constant Field Values

PS_MAPI

public static final int PS_MAPI
See Also:
Constant Field Values

PSETID_AirSync

public static final int PSETID_AirSync
See Also:
Constant Field Values

PSETID_Sharing

public static final int PSETID_Sharing
See Also:
Constant Field Values
Constructor Detail

PSTFile

public PSTFile(java.lang.String fileName)
        throws java.io.FileNotFoundException,
               PSTException,
               java.io.IOException
constructor

Parameters:
fileName -
Throws:
java.io.FileNotFoundException
PSTException
java.io.IOException

PSTFile

public PSTFile(java.io.File fileName)
        throws java.io.FileNotFoundException,
               PSTException,
               java.io.IOException
Throws:
java.io.FileNotFoundException
PSTException
java.io.IOException
Method Detail

getPSTFileType

public int getPSTFileType()

finalize

protected void finalize()
                 throws java.io.IOException
destructor just closes the file handle...

Overrides:
finalize in class java.lang.Object
Throws:
java.io.IOException

getEncryptionType

public int getEncryptionType()
get the type of encryption the file uses

Returns:
encryption type used in the PST File

getFileHandle

public java.io.RandomAccessFile getFileHandle()
get the handle to the file we are currently accessing


getMessageStore

public PSTMessageStore getMessageStore()
                                throws PSTException,
                                       java.io.IOException
get the message store of the PST file. Note that this doesn't really have much information, better to look under the root folder

Throws:
PSTException
java.io.IOException

getRootFolder

public PSTFolder getRootFolder()
                        throws PSTException,
                               java.io.IOException
get the root folder for the PST file. You should find all of your data under here...

Throws:
PSTException
java.io.IOException

getLeafSize

public int getLeafSize(long bid)
                throws java.io.IOException,
                       PSTException
Throws:
java.io.IOException
PSTException

extractLEFileOffset

protected long extractLEFileOffset(long startOffset)
                            throws java.io.IOException
Read a file offset from the file PST Files have this tendency to store file offsets (pointers) in 8 little endian bytes. Convert this to a long for seeking to.

Parameters:
in - handle for PST file
startOffset - where to read the 8 bytes from
Returns:
long representing the read location
Throws:
java.io.IOException