public class AFPParserConfiguration
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
AFPParser, see AFPParser.AFPParser(AFPParserConfiguration).| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isParserOwnsInputStream |
| Constructor and Description |
|---|
AFPParserConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
AFPParserConfiguration |
clone() |
java.nio.charset.Charset |
getAfpCharSet()
Returns the
Charset used to decode text contained in the AFP data stream (e.g. |
java.io.File |
getAFPFile() |
int |
getBufferSize()
Returns the size of input buffer used by the parser.
|
BDD_BarCodeDataDescriptor |
getCurrentBarCodeDataDescriptor() |
CPC_CodePageControl |
getCurrentCodePageControl() |
CPD_CodePageDescriptor |
getCurrentCodePageDescriptor() |
CPD_CodePageDescriptor |
getCurrentCPD_CodePageDescriptor() |
FNC_FontControl |
getCurrentFontControl() |
CPC_CodePageControl |
getCurrentPageControl() |
java.io.InputStream |
getInputStream()
Returns the
InputStream from where the parser reads the AFP data stream. |
boolean |
isBuildShallow()
Returns true if the parser is building shallow
StructuredFields. |
boolean |
isEscalateParsingErrors() |
boolean |
isParseToStructuredFieldsBaseData()
Returns true if the parser decodes structured fields of type
StructuredFieldBaseData
and the payload of the structured field is seen as blackbox and not further processed by the
parser. |
void |
resetCurrentAFPObjects()
Resets all preserved AFP objects that are needed by the parser for later reference to null.
|
void |
setAfpCharSet(java.nio.charset.Charset afpCharSet)
Sets the
Charset used to decode text contained in the AFP data stream (e.g. |
void |
setAFPFile(java.io.File afpFile) |
void |
setBufferSize(int bufferSize)
Sets the size of input buffer used by the parser.
|
void |
setBuildShallow(boolean isBuildShallow)
If set to true the parser is building shallow
StructuredFields. |
void |
setCurrentBarCodeDataDescriptor(BDD_BarCodeDataDescriptor currentBarCodeDataDescriptor) |
void |
setCurrentCodePageDescriptor(CPD_CodePageDescriptor currentCodePageDescriptor) |
void |
setCurrentFontControl(FNC_FontControl fontControl) |
void |
setCurrentPageControl(CPC_CodePageControl currentPageControl) |
void |
setEscalateParsingErrors(boolean escalateParsingErrors)
If set to true (default) and a parsing error occurs, an
AFPParserException
is thrown that carries the erroneous structured field as an
StructuredFieldErrornouslyBuilt. |
void |
setInputStream(java.io.InputStream inputStream)
Sets the
InputStream from where the parser reads the AFP data stream. |
void |
setParseToStructuredFieldsBaseData(boolean isParseToStructuredFieldsBaseData)
If set to true the parser produces structured fields of type
StructuredFieldBaseData. |
public java.nio.charset.Charset getAfpCharSet()
Charset used to decode text contained in the AFP data stream (e.g.
PTX,NOP,TLE).Charset used in the AFP data stream.public void setAfpCharSet(java.nio.charset.Charset afpCharSet)
Charset used to decode text contained in the AFP data stream (e.g.
PTX,NOP,TLE).afpCharSet - Charset used in the AFP data stream.public int getBufferSize()
public void setBufferSize(int bufferSize)
bufferSize - size of input file buffer used by the parser.public java.io.InputStream getInputStream()
throws java.io.IOException
InputStream from where the parser reads the AFP data stream. If no input
stream is set this method tries to open the configured AFP file (see setAFPFile(File))
as buffered input stream.InputStream from where the parser reads the AFP data stream.java.io.IOException - if the input stream is not set and the opening of the configured AFP file
could not be opened.public void setInputStream(java.io.InputStream inputStream)
InputStream from where the parser reads the AFP data stream.inputStream - the InputStream from where the parser reads the AFP data stream.public FNC_FontControl getCurrentFontControl()
public void setCurrentFontControl(FNC_FontControl fontControl)
public boolean isParseToStructuredFieldsBaseData()
StructuredFieldBaseData
and the payload of the structured field is seen as blackbox and not further processed by the
parser.StructuredFieldBaseData.public void setParseToStructuredFieldsBaseData(boolean isParseToStructuredFieldsBaseData)
StructuredFieldBaseData.
StructuredFieldBaseData have a full blown StructuredFieldIntroducer but beside
that provides only getter and setter for the structured fields's payload.public CPD_CodePageDescriptor getCurrentCPD_CodePageDescriptor()
public CPC_CodePageControl getCurrentCodePageControl()
public boolean isBuildShallow()
StructuredFields. Shallow SFs consist
only of StructuredFieldIntroducer, the value of all other fields remain undefined until
AFPParser.reload(StructuredField) is called. Shallow SFs require considerably less
memory than fully realized SFs.public void setBuildShallow(boolean isBuildShallow)
StructuredFields. See isBuildShallow().public boolean isEscalateParsingErrors()
public void setEscalateParsingErrors(boolean escalateParsingErrors)
AFPParserException
is thrown that carries the erroneous structured field as an
StructuredFieldErrornouslyBuilt.
If set to false and a parsing error occurs, AFPParser.parseNextSF() returns a
StructuredField of type StructuredFieldErrornouslyBuilt without throwing
an exception and continues parsing the rest of the AFP stream.
escalateParsingErrors - true if parsing errors should be escalated.public AFPParserConfiguration clone()
clone in class java.lang.Objectpublic BDD_BarCodeDataDescriptor getCurrentBarCodeDataDescriptor()
public void setCurrentBarCodeDataDescriptor(BDD_BarCodeDataDescriptor currentBarCodeDataDescriptor)
public CPD_CodePageDescriptor getCurrentCodePageDescriptor()
public void setCurrentCodePageDescriptor(CPD_CodePageDescriptor currentCodePageDescriptor)
public CPC_CodePageControl getCurrentPageControl()
public void setCurrentPageControl(CPC_CodePageControl currentPageControl)
public java.io.File getAFPFile()
public void setAFPFile(java.io.File afpFile)
public void resetCurrentAFPObjects()