Package com.pff

Class PSTNodeInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class PSTNodeInputStream
    extends java.io.InputStream
    this input stream basically "maps" an input stream on top of the random access file
    • Field Detail

      • in

        private java.io.RandomAccessFile in
      • skipPoints

        private java.util.LinkedList<java.lang.Long> skipPoints
      • currentBlock

        private int currentBlock
      • currentLocation

        private long currentLocation
      • allData

        private byte[] allData
      • length

        private long length
      • encrypted

        private boolean encrypted
      • totalLoopCount

        private int totalLoopCount
    • Method Detail

      • isEncrypted

        public boolean isEncrypted()
      • getBlockSkipPoints

        private void getBlockSkipPoints​(byte[] data)
                                 throws java.io.IOException,
                                        PSTException
        Throws:
        java.io.IOException
        PSTException
      • 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()