Top Description Fields Constructors Methods
org.apache.pdfbox.contentstream.operator

public abstract Class OperatorProcessor

extends Object
Class Inheritance
Known Direct Subclasses
org.apache.pdfbox.contentstream.operator.color.SetColor, org.apache.pdfbox.contentstream.operator.color.SetNonStrokingColorSpace, org.apache.pdfbox.contentstream.operator.color.SetStrokingColorSpace, org.apache.pdfbox.contentstream.operator.graphics.GraphicsOperatorProcessor, org.apache.pdfbox.contentstream.operator.markedcontent.BeginMarkedContentSequence, org.apache.pdfbox.contentstream.operator.markedcontent.BeginMarkedContentSequenceWithProperties, org.apache.pdfbox.contentstream.operator.markedcontent.DrawObject, org.apache.pdfbox.contentstream.operator.markedcontent.EndMarkedContentSequence, org.apache.pdfbox.contentstream.operator.state.Concatenate, org.apache.pdfbox.contentstream.operator.state.Restore, org.apache.pdfbox.contentstream.operator.state.Save, org.apache.pdfbox.contentstream.operator.state.SetFlatness, org.apache.pdfbox.contentstream.operator.state.SetGraphicsStateParameters, org.apache.pdfbox.contentstream.operator.state.SetLineCapStyle, org.apache.pdfbox.contentstream.operator.state.SetLineDashPattern, org.apache.pdfbox.contentstream.operator.state.SetLineJoinStyle, org.apache.pdfbox.contentstream.operator.state.SetLineMiterLimit, org.apache.pdfbox.contentstream.operator.state.SetLineWidth, org.apache.pdfbox.contentstream.operator.state.SetMatrix, org.apache.pdfbox.contentstream.operator.state.SetRenderingIntent, org.apache.pdfbox.contentstream.operator.text.BeginText, org.apache.pdfbox.contentstream.operator.text.EndText, org.apache.pdfbox.contentstream.operator.text.MoveText, org.apache.pdfbox.contentstream.operator.text.MoveTextSetLeading, org.apache.pdfbox.contentstream.operator.text.NextLine, org.apache.pdfbox.contentstream.operator.text.SetCharSpacing, org.apache.pdfbox.contentstream.operator.text.SetFontAndSize, org.apache.pdfbox.contentstream.operator.text.SetTextHorizontalScaling, org.apache.pdfbox.contentstream.operator.text.SetTextLeading, org.apache.pdfbox.contentstream.operator.text.SetTextRenderingMode, org.apache.pdfbox.contentstream.operator.text.SetTextRise, org.apache.pdfbox.contentstream.operator.text.SetWordSpacing, org.apache.pdfbox.contentstream.operator.text.ShowText, org.apache.pdfbox.contentstream.operator.text.ShowTextAdjusted, org.apache.pdfbox.contentstream.operator.text.ShowTextLine, org.apache.pdfbox.contentstream.operator.text.ShowTextLineAndSpace, org.apache.pdfbox.contentstream.operator.DrawObject
Imports
org.apache.pdfbox.cos.COSBase, org.apache.pdfbox.contentstream.PDFStreamEngine, java.util.List, java.io.IOException

Processes a PDF operator.
Author
Laurent Huault

Field Summary

Modifier and TypeField and Description
private final PDFStreamEngine
context

The processing context.

Constructor Summary

AccessConstructor and Description
protected
OperatorProcessor(PDFStreamEngine
the processing context to be used
context
)

Creates a new OperatorProcessor.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if all operands list elements are an instance of the given class
checkArrayTypesClass
(List<COSBase>
The operands list.
operands
,
Class<?>
The expected class.
clazz
)

Check whether all operands list elements are an instance of a specific class.

protected final PDFStreamEngine

Returns:

the processing context
getContext
()

Returns the processing context.

public abstract String

Returns:

the name of the operator
getName
()

Returns the name of this operator, e.g. "BI".

public abstract void
process(Operator
the operator to process
operator
,
List<COSBase>
the operands to use when processing
operands
)

Process the operator.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final PDFStreamEngine context

The processing context.

Constructor Detail

OperatorProcessorback to summary
protected OperatorProcessor(PDFStreamEngine context)

Creates a new OperatorProcessor.

Parameters
context:PDFStreamEngine

the processing context to be used

Method Detail

checkArrayTypesClassback to summary
public boolean checkArrayTypesClass(List<COSBase> operands, Class<?> clazz)

Check whether all operands list elements are an instance of a specific class.

Parameters
operands:List<COSBase>

The operands list.

clazz:Class<?>

The expected class.

Returns:boolean

true if all operands list elements are an instance of the given class

getContextback to summary
protected final PDFStreamEngine getContext()

Returns the processing context.

Returns:PDFStreamEngine

the processing context

getNameback to summary
public abstract String getName()

Returns the name of this operator, e.g. "BI".

Returns:String

the name of the operator

processback to summary
public abstract void process(Operator operator, List<COSBase> operands) throws IOException

Process the operator.

Parameters
operator:Operator

the operator to process

operands:List<COSBase>

the operands to use when processing

Exceptions
IOException:
if the operator cannot be processed