org.icepdf.core.io
Class BufferedMarkedInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.BufferedInputStream
              extended by org.icepdf.core.io.BufferedMarkedInputStream
All Implemented Interfaces:
java.io.Closeable

public class BufferedMarkedInputStream
extends java.io.BufferedInputStream

BufferedMarkedInputStream extends BufferedInputStream and keeps count for the total number bytes read between buffer fills. This class is used by the linearTraversal loading mechanism so that the byte offset of found objects can be stored. The offset is then used to correct the cross reference table object offset.

Since:
5.0

Field Summary
 
Fields inherited from class java.io.BufferedInputStream
buf, count, marklimit, markpos, pos
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
BufferedMarkedInputStream(java.io.InputStream in)
           
BufferedMarkedInputStream(java.io.InputStream in, int size)
           
 
Method Summary
 int getMarkedPosition()
           
 int read()
           
 void reset()
           
 
Methods inherited from class java.io.BufferedInputStream
available, close, mark, markSupported, read, skip
 
Methods inherited from class java.io.FilterInputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferedMarkedInputStream

public BufferedMarkedInputStream(java.io.InputStream in)

BufferedMarkedInputStream

public BufferedMarkedInputStream(java.io.InputStream in,
                                 int size)
Method Detail

getMarkedPosition

public int getMarkedPosition()

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.BufferedInputStream
Throws:
java.io.IOException

reset

public void reset()
           throws java.io.IOException
Overrides:
reset in class java.io.BufferedInputStream
Throws:
java.io.IOException