Class PstFile
java.lang.Object
com.independentsoft.pst.PstFile
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close.static PstFileCreates a new Unicode PST file with the message store and the default (Outlook) folder structure, opened for editing.Gets the charset.Gets the encryption type.getFolder(byte[] entryId) Gets the folder.getFolder(long id) Gets the folder.getItem(byte[] entryId) Gets the item.getItem(long id) Gets the item.Gets the mailbox root.Gets the message store.getRoot()Gets the root.longgetSize()Gets the size.booleanis64Bit()Checks if is 64 bit.voidOpen.voidOpen.voidOpen.voidOpen.voidsave()Persists the edits of a store opened for editing (viacreate(String)orREAD_WRITE) back to its source.voidPersists the edits of a store opened for editing to the given path.voidsetCharset(String charset) Sets the charset.
-
Constructor Details
-
PstFile
public PstFile()Instantiates a new pst file. -
PstFile
Initializes a new instance of thePstFileclass with the given access mode.READ_WRITEopens the file for in-place editing (changes persisted bysave());READopens it read-only.- Parameters:
filePath- the file path.access- the access mode.- Throws:
IOException- if an I/O error occurs.
-
PstFile
Instantiates a new pst file.- Parameters:
filePath- the file path- Throws:
IOException- Signals that an I/O exception has occurred.
-
PstFile
Instantiates a new pst file.- Parameters:
filePath- the file pathcharset- the charset- Throws:
IOException- Signals that an I/O exception has occurred.
-
PstFile
Instantiates a new pst file.- Parameters:
file- the file- Throws:
IOException- Signals that an I/O exception has occurred.
-
PstFile
Instantiates a new pst file.- Parameters:
file- the filecharset- the charset- Throws:
IOException- Signals that an I/O exception has occurred.
-
-
Method Details
-
create
Creates a new Unicode PST file with the message store and the default (Outlook) folder structure, opened for editing. Add user folders and items viagetRoot(), then callsave()to persist the changes.- Parameters:
filePath- the destination file path.- Returns:
- an editable
PstFile. - Throws:
IOException- if an I/O error occurs.
-
save
Persists the edits of a store opened for editing (viacreate(String)orREAD_WRITE) back to its source.- Throws:
IOException- if an I/O error occurs.
-
save
Persists the edits of a store opened for editing to the given path.- Parameters:
filePath- the destination file path.- Throws:
IOException- if an I/O error occurs.
-
open
Open.- Parameters:
filePath- the file path- Throws:
IOException- Signals that an I/O exception has occurred.
-
open
Open.- Parameters:
filePath- the file pathcharset- the charset- Throws:
IOException- Signals that an I/O exception has occurred.
-
open
Open.- Parameters:
file- the file- Throws:
IOException- Signals that an I/O exception has occurred.
-
open
Open.- Parameters:
file- the filecharset- the charset- Throws:
IOException- Signals that an I/O exception has occurred.
-
close
Close.- Throws:
IOException- Signals that an I/O exception has occurred.
-
getFolder
Gets the folder.- Parameters:
entryId- the entry id- Returns:
- the folder
- Throws:
IOException- Signals that an I/O exception has occurred.
-
getFolder
Gets the folder.- Parameters:
id- the id- Returns:
- the folder
- Throws:
IOException- Signals that an I/O exception has occurred.
-
getItem
Gets the item.- Parameters:
entryId- the entry id- Returns:
- the item
- Throws:
IOException- Signals that an I/O exception has occurred.
-
getItem
Gets the item.- Parameters:
id- the id- Returns:
- the item
- Throws:
IOException- Signals that an I/O exception has occurred.
-
is64Bit
public boolean is64Bit()Checks if is 64 bit.- Returns:
- true, if is 64 bit
-
getSize
public long getSize()Gets the size.- Returns:
- the size
-
getEncryptionType
-
getMessageStore
-
getRoot
-
getMailboxRoot
-
getCharset
-
setCharset
-