|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pdfbox.pdfparser.BaseParser
org.apache.pdfbox.pdfparser.PDFStreamParser
public class PDFStreamParser
This will parse a PDF byte stream and extract operands and such.
| Field Summary |
|---|
| Fields inherited from class org.apache.pdfbox.pdfparser.BaseParser |
|---|
DEF, document, ENDOBJ, ENDSTREAM, forceParsing, pdfSource, PROP_PUSHBACK_SIZE |
| Constructor Summary | |
|---|---|
PDFStreamParser(COSStream stream)
Constructor. |
|
PDFStreamParser(COSStream stream,
boolean forceParsing)
Constructor. |
|
PDFStreamParser(InputStream stream,
RandomAccess raf)
Constructor that takes a stream to parse. |
|
PDFStreamParser(InputStream stream,
RandomAccess raf,
boolean forceParsing)
Constructor that takes a stream to parse. |
|
PDFStreamParser(PDStream stream)
Constructor. |
|
| Method Summary | |
|---|---|
void |
clearResources()
Release all used resources. |
void |
close()
This will close the underlying pdfSource object. |
Iterator<Object> |
getTokenIterator()
This will get an iterator which can be used to parse the stream one token after the other. |
List<Object> |
getTokens()
This will get the tokens that were parsed from the stream. |
void |
parse()
This will parse the tokens in the stream. |
protected String |
readOperator()
This will read an operator from the stream. |
| Methods inherited from class org.apache.pdfbox.pdfparser.BaseParser |
|---|
isClosing, isClosing, isEndOfName, isEOL, isEOL, isWhitespace, isWhitespace, parseBoolean, parseCOSArray, parseCOSDictionary, parseCOSName, parseCOSStream, parseCOSString, parseCOSString, parseDirObject, readExpectedString, readGenerationNumber, readInt, readLine, readLong, readObjectNumber, readString, readString, readStringNumber, readUntilEndStream, setDocument, skipSpaces |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PDFStreamParser(InputStream stream,
RandomAccess raf,
boolean forceParsing)
throws IOException
stream - The stream to read data from.raf - The random access file.forceParsing - flag to skip malformed or otherwise unparseable
input where possible
IOException - If there is an error reading from the stream.
public PDFStreamParser(InputStream stream,
RandomAccess raf)
throws IOException
stream - The stream to read data from.raf - The random access file.
IOException - If there is an error reading from the stream.
public PDFStreamParser(PDStream stream)
throws IOException
stream - The stream to parse.
IOException - If there is an error initializing the stream.
public PDFStreamParser(COSStream stream,
boolean forceParsing)
throws IOException
stream - The stream to parse.forceParsing - flag to skip malformed or otherwise unparseable
input where possible
IOException - If there is an error initializing the stream.
public PDFStreamParser(COSStream stream)
throws IOException
stream - The stream to parse.
IOException - If there is an error initializing the stream.| Method Detail |
|---|
public void parse()
throws IOException
IOException - If there is an error while parsing the stream.public List<Object> getTokens()
public void close()
throws IOException
IOException - If there is an error releasing resources.public Iterator<Object> getTokenIterator()
protected String readOperator()
throws IOException
IOException - If there is an error reading from the stream.public void clearResources()
clearResources in class BaseParser
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||