|
jPod PDF library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.pdf.parser.PDFParser
de.intarsys.pdf.parser.COSDocumentParser
public class COSDocumentParser
A parser for PDF data streams.
The parser will create a object representation of the pdf document using COS level objects.
The parser is a one pass, read everything implementation.
| Field Summary | |
|---|---|
static int |
SEARCH_BUFFER_SIZE
use a buffer large than specified by the spec. we already had documents with whitespace padding > 1024 bytes! |
| Constructor Summary | |
|---|---|
COSDocumentParser(STDocument doc)
|
|
| Method Summary | |
|---|---|
STDocument |
getDoc()
|
boolean |
isTokenXRefAt(de.intarsys.tools.randomaccess.IRandomAccess input,
int offset)
|
COSObject |
parseIndirectObject(de.intarsys.tools.randomaccess.IRandomAccess input,
ISystemSecurityHandler securityHandler)
read a pdf style object from the input. see PDF Reference v1.4, chapter 3.2.9 Indirect Objects COSIndirectObject ::= ObjNum GenNum "obj" Object "endobj" |
int |
parseStartXRef(de.intarsys.tools.randomaccess.IRandomAccess input)
the startxref value. |
COSDictionary |
parseTrailer(de.intarsys.tools.randomaccess.IRandomAccess input)
parse the trailer section from the current stream position. see PDF Reference v1.4, chapter 3.4.4 File Trailer DocumentTrailer ::= "trailer" COSDict "startxref" COSNumber |
int |
searchLastStartXRef(de.intarsys.tools.randomaccess.IRandomAccess input)
Searches the offset to the first trailer in the last SEARCH_BUFFER_SIZE bytes of the document. |
int |
searchLinearized(de.intarsys.tools.randomaccess.IRandomAccess input)
Deprecated. Don't use this anymore Returns the offset of the dictionary with linearization parameters if any. Returns -1 otherwise. |
| Methods inherited from class de.intarsys.pdf.parser.PDFParser |
|---|
getExceptionHandler, handleError, handleWarning, isDelimiter, isDigit, isEOL, isNumberStart, isOctalDigit, isTokenStart, isWhitespace, parseElement, parseHeader, readInteger, readSpaces, readToken, readToken, setExceptionHandler, toCOSObject |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SEARCH_BUFFER_SIZE
| Constructor Detail |
|---|
public COSDocumentParser(STDocument doc)
| Method Detail |
|---|
public STDocument getDoc()
public boolean isTokenXRefAt(de.intarsys.tools.randomaccess.IRandomAccess input,
int offset)
throws IOException
IOException
public COSObject parseIndirectObject(de.intarsys.tools.randomaccess.IRandomAccess input,
ISystemSecurityHandler securityHandler)
throws IOException,
COSLoadException
IOException
COSLoadException
public int parseStartXRef(de.intarsys.tools.randomaccess.IRandomAccess input)
throws IOException,
COSLoadException
IOException
COSLoadException
public COSDictionary parseTrailer(de.intarsys.tools.randomaccess.IRandomAccess input)
throws IOException,
COSLoadException
IOException
COSLoadException
public int searchLastStartXRef(de.intarsys.tools.randomaccess.IRandomAccess input)
throws IOException,
COSLoadException
IOException
COSLoadException
@Deprecated
public int searchLinearized(de.intarsys.tools.randomaccess.IRandomAccess input)
throws IOException,
COSLoadException
input -
IOException
COSLoadException
|
jPod PDF library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||