com.pff
Class PSTNodeInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.pff.PSTNodeInputStream
All Implemented Interfaces:
java.io.Closeable

public class PSTNodeInputStream
extends java.io.InputStream

this input stream basically "maps" an input stream on top of the random access file


Method Summary
 java.lang.Long[] getBlockOffsets()
          Get the offsets (block positions) used in the array
 PSTFile getPSTFile()
           
 boolean isEncrypted()
           
 long length()
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] output)
          Read a block from the input stream.
 int read(byte[] output, int offset, int length)
           
 void reset()
           
 void seek(long location)
           
 long seekAndReadLong(long location, int bytes)
           
 
Methods inherited from class java.io.InputStream
available, close, mark, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isEncrypted

public boolean isEncrypted()

length

public long length()

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] output)
         throws java.io.IOException
Read a block from the input stream. Recommended block size = 8176 (size used internally by PSTs)

Overrides:
read in class java.io.InputStream
Parameters:
output -
Returns:
Throws:
java.io.IOException

read

public int read(byte[] output,
                int offset,
                int length)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

reset

public void reset()
Overrides:
reset in class java.io.InputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.InputStream

getBlockOffsets

public java.lang.Long[] getBlockOffsets()
Get the offsets (block positions) used in the array

Returns:

seek

public void seek(long location)
          throws java.io.IOException,
                 PSTException
Throws:
java.io.IOException
PSTException

seekAndReadLong

public long seekAndReadLong(long location,
                            int bytes)
                     throws java.io.IOException,
                            PSTException
Throws:
java.io.IOException
PSTException

getPSTFile

public PSTFile getPSTFile()