org.icepdf.core.util
Class LazyObjectLoader

java.lang.Object
  extended by org.icepdf.core.util.LazyObjectLoader

public class LazyObjectLoader
extends java.lang.Object

Since:
2.0
Author:
Mark Collette

Field Summary
protected  SoftLRUCache<Reference,ObjectStream> leastRecentlyUsed
           
 
Constructor Summary
LazyObjectLoader(Library lib, SeekableInput seekableInput, CrossReference xref)
           
 
Method Summary
 Library getLibrary()
          Get the documents library object.
 boolean haveEntry(Reference reference)
           
 java.lang.Object loadObject(Reference reference)
          Loads an object via it's reference.
 PTrailer loadTrailer(long position)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

leastRecentlyUsed

protected SoftLRUCache<Reference,ObjectStream> leastRecentlyUsed
Constructor Detail

LazyObjectLoader

public LazyObjectLoader(Library lib,
                        SeekableInput seekableInput,
                        CrossReference xref)
Method Detail

loadObject

public java.lang.Object loadObject(Reference reference)
Loads an object via it's reference. Stream object data is initialized so that we can release the file lock more quickly.

Parameters:
reference - object reference
Returns:
found object; dictionary, stream or pobject.

haveEntry

public boolean haveEntry(Reference reference)

loadTrailer

public PTrailer loadTrailer(long position)

getLibrary

public Library getLibrary()
Get the documents library object.

Returns:
documents library object.