|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.pdfview.BaseWatchable
com.sun.pdfview.PDFParser
public class PDFParser
PDFParser is the class that parses a PDF content stream and produces PDFCmds for a PDFPage. You should never ever see it run: it gets created by a PDFPage only if needed, and may even run in its own thread.
Field Summary | |
---|---|
static java.lang.String |
DEBUG_DCTDECODE_DATA
emit a file of DCT stream data. |
static int |
debuglevel
|
Fields inherited from interface com.sun.pdfview.Watchable |
---|
COMPLETED, ERROR, NEEDS_DATA, NOT_STARTED, PAUSED, RUNNING, STOPPED, UNKNOWN |
Constructor Summary | |
---|---|
PDFParser(PDFPage cmds,
byte[] stream,
java.util.HashMap<java.lang.String,PDFObject> resources)
Don't call this constructor directly. |
Method Summary | |
---|---|
void |
cleanup()
Cleanup when iteration is done |
static void |
debug(java.lang.String msg,
int level)
|
java.lang.String |
dumpStream()
|
void |
dumpStreamToError()
|
static void |
emitDataFile(byte[] ary,
java.lang.String name)
take a byte array and write a temporary file with it's data. |
static java.lang.String |
escape(java.lang.String msg)
|
int |
iterate()
parse the stream. |
static void |
setDebugLevel(int level)
|
void |
setup()
Called to prepare for some iterations |
Methods inherited from class com.sun.pdfview.BaseWatchable |
---|
execute, getStatus, go, go, go, go, isExecutable, isFinished, isSuppressSetErrorStackTrace, run, setError, setStatus, setSuppressSetErrorStackTrace, stop, waitForFinish |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEBUG_DCTDECODE_DATA
public static int debuglevel
Constructor Detail |
---|
public PDFParser(PDFPage cmds, byte[] stream, java.util.HashMap<java.lang.String,PDFObject> resources)
Method Detail |
---|
public static void debug(java.lang.String msg, int level)
public static java.lang.String escape(java.lang.String msg)
public static void setDebugLevel(int level)
public void setup()
setup
in class BaseWatchable
public int iterate() throws java.lang.Exception
Page numbers in comments refer to the Adobe PDF specification.
commands are listed in PDF spec 32000-1:2008 in Table A.1
iterate
in class BaseWatchable
java.lang.Exception
public void cleanup()
cleanup
in class BaseWatchable
public void dumpStreamToError()
public java.lang.String dumpStream()
public static void emitDataFile(byte[] ary, java.lang.String name)
ary
- name
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |