jPod PDF library

de.intarsys.pdf.cos
Class COSTools

java.lang.Object
  extended by de.intarsys.pdf.cos.COSTools

public class COSTools
extends Object

Some tools to ease life with COS.


Nested Class Summary
static class COSTools.Revision
           
 
Method Summary
static COSObject createObject(Object javaObject)
          Deprecated. use COSConverter
static List<COSTools.Revision> getRevisions(COSDocument doc)
           
static List<COSTools.Revision> getSubsequentRevisions(COSDocument doc, STXRefSection base)
           
static List<de.intarsys.tools.locator.ILocator> getVersions(COSDocument doc)
          A collection of ILocator instances, representing the versions created when writing incrementally.
static COSDictionary toDictionary(COSObject object)
          Tries to force a dictionary out of the COSObject.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createObject

@Deprecated
public static COSObject createObject(Object javaObject)
Deprecated. use COSConverter

Try the best in marshalling java objects directly to COSObject. Collections will be marshalled recursively.

Parameters:
javaObject - the java object to be marshalled
Returns:
The resulting COSObject

getRevisions

public static List<COSTools.Revision> getRevisions(COSDocument doc)
                                            throws IOException,
                                                   COSLoadException
Throws:
IOException
COSLoadException

getSubsequentRevisions

public static List<COSTools.Revision> getSubsequentRevisions(COSDocument doc,
                                                             STXRefSection base)
                                                      throws IOException,
                                                             COSLoadException
Throws:
IOException
COSLoadException

getVersions

public static List<de.intarsys.tools.locator.ILocator> getVersions(COSDocument doc)
                                                            throws IOException,
                                                                   COSLoadException
A collection of ILocator instances, representing the versions created when writing incrementally.

Parameters:
doc - The original document.
Returns:
A collection of ILocator instances, representing the versions created when writing incrementally.
Throws:
IOException
COSLoadException

toDictionary

public static COSDictionary toDictionary(COSObject object)
Tries to force a dictionary out of the COSObject.

Parameters:
object - The object to be cast to a COSDictionary
Returns:
COSDictionary or null

jPod PDF library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.