|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lowagie.text.pdf.XfdfReader
public class XfdfReader
Reads a XFDF.
| Field Summary | |
|---|---|
private java.util.Stack |
fieldNames
|
(package private) java.util.HashMap |
fields
|
private java.util.Stack |
fieldValues
|
(package private) java.lang.String |
fileSpec
|
private boolean |
foundRoot
|
| Constructor Summary | |
|---|---|
XfdfReader(byte[] xfdfIn)
Reads an XFDF form. |
|
XfdfReader(java.lang.String filename)
Reads an XFDF form. |
|
| Method Summary | |
|---|---|
void |
endDocument()
Called after the document is parsed. |
void |
endElement(java.lang.String tag)
Called when an end tag is found. |
java.lang.String |
getField(java.lang.String name)
Gets the field value. |
java.util.HashMap |
getFields()
Gets all the fields. |
java.lang.String |
getFieldValue(java.lang.String name)
Gets the field value or null if the field does not
exist or has no value defined. |
java.lang.String |
getFileSpec()
Gets the PDF file specification contained in the FDF. |
void |
startDocument()
Called when the document starts to be parsed. |
void |
startElement(java.lang.String tag,
java.util.HashMap h)
Called when a start tag is found. |
void |
text(java.lang.String str)
Called when a text element is found. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean foundRoot
private java.util.Stack fieldNames
private java.util.Stack fieldValues
java.util.HashMap fields
java.lang.String fileSpec
| Constructor Detail |
|---|
public XfdfReader(java.lang.String filename)
throws java.io.IOException
filename - the file name of the form
java.io.IOException - on error
public XfdfReader(byte[] xfdfIn)
throws java.io.IOException
xfdfIn - the byte array with the form
java.io.IOException - on error| Method Detail |
|---|
public java.util.HashMap getFields()
PdfDictionary
with the field content.
public java.lang.String getField(java.lang.String name)
name - the fully qualified field name
public java.lang.String getFieldValue(java.lang.String name)
null if the field does not
exist or has no value defined.
name - the fully qualified field name
nullpublic java.lang.String getFileSpec()
public void startElement(java.lang.String tag,
java.util.HashMap h)
startElement in interface SimpleXMLDocHandlertag - the tag nameh - the tag's attributespublic void endElement(java.lang.String tag)
endElement in interface SimpleXMLDocHandlertag - the tag namepublic void startDocument()
startDocument in interface SimpleXMLDocHandlerpublic void endDocument()
endDocument in interface SimpleXMLDocHandlerpublic void text(java.lang.String str)
text in interface SimpleXMLDocHandlerstr - the text element, probably a fragment.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||