Package com.pff
Class PSTNodeInputStream
java.lang.Object
java.io.InputStream
com.pff.PSTNodeInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
this input stream basically "maps" an input stream on top of the random access file
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]private intprivate longprivate booleanprivate RandomAccessFileprivate LinkedList<OffsetIndexItem> private longprivate PSTFileprivate LinkedList<Long> private int -
Constructor Summary
ConstructorsConstructorDescriptionPSTNodeInputStream(PSTFile pstFile, byte[] attachmentData) PSTNodeInputStream(PSTFile pstFile, byte[] attachmentData, boolean encrypted) PSTNodeInputStream(PSTFile pstFile, OffsetIndexItem offsetItem) PSTNodeInputStream(PSTFile pstFile, PSTDescriptorItem descriptorItem) -
Method Summary
Modifier and TypeMethodDescriptionLong[]Get the offsets (block positions) used in the arrayprivate voidgetBlockSkipPoints(byte[] data) booleanlonglength()private voidloadFromOffsetItem(OffsetIndexItem offsetItem) booleanintread()intread(byte[] output) Read a block from the input stream.intread(byte[] output, int offset, int length) voidreset()voidseek(long location) longseekAndReadLong(long location, int bytes) Methods inherited from class java.io.InputStream
available, close, mark, nullInputStream, readAllBytes, readNBytes, readNBytes, skip, skipNBytes, transferTo
-
Field Details
-
in
-
pstFile
-
skipPoints
-
indexItems
-
currentBlock
private int currentBlock -
currentLocation
private long currentLocation -
allData
private byte[] allData -
length
private long length -
encrypted
private boolean encrypted -
totalLoopCount
private int totalLoopCount
-
-
Constructor Details
-
PSTNodeInputStream
PSTNodeInputStream(PSTFile pstFile, byte[] attachmentData) -
PSTNodeInputStream
PSTNodeInputStream(PSTFile pstFile, byte[] attachmentData, boolean encrypted) -
PSTNodeInputStream
PSTNodeInputStream(PSTFile pstFile, PSTDescriptorItem descriptorItem) throws IOException, PSTException - Throws:
IOExceptionPSTException
-
PSTNodeInputStream
PSTNodeInputStream(PSTFile pstFile, OffsetIndexItem offsetItem) throws IOException, PSTException - Throws:
IOExceptionPSTException
-
-
Method Details
-
loadFromOffsetItem
- Throws:
IOExceptionPSTException
-
isEncrypted
public boolean isEncrypted() -
getBlockSkipPoints
- Throws:
IOExceptionPSTException
-
length
public long length() -
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
Read a block from the input stream. Recommended block size = 8176 (size used internally by PSTs)- Overrides:
readin classInputStream- Parameters:
output-- Returns:
- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
reset
public void reset()- Overrides:
resetin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
getBlockOffsets
Get the offsets (block positions) used in the array- Returns:
-
seek
- Throws:
IOExceptionPSTException
-
seekAndReadLong
- Throws:
IOExceptionPSTException
-
getPSTFile
-