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

public final Class Operator

extends Object
Class Inheritance
Imports
org.apache.pdfbox.cos.COSDictionary, java.util.concurrent.ConcurrentHashMap, .ConcurrentMap

An Operator in a PDF content stream.
Author
Ben Litchfield

Field Summary

Modifier and TypeField and Description
private byte[]
private COSDictionary
private static final ConcurrentMap<String, Operator>
operators

map for singleton operator objects; use ConcurrentHashMap for better scalability with multiple threads

private final String

Constructor Summary

AccessConstructor and Description
private
Operator(String
The operator that this object will represent.
aOperator
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

Value of property imageData.
getImageData
()

This is the special case for the ID operator where there are just random bytes inlined the stream.

public COSDictionary

Returns:

The image parameters.
getImageParameters
()

This will get the image parameters, this is only valid for BI operators.

public String

Returns:

The string representation of the operation.
getName
()

This will get the name of the operator.

public static Operator

Returns:

The operator that matches the operator keyword.
getOperator
(String
The operator for the system.
operator
)

This is used to create/cache operators in the system.

public void
setImageData(byte[]
New value of property imageData.
imageDataArray
)

This will set the image data, this is only used for the ID operator.

public void
setImageParameters(COSDictionary
The image parameters.
params
)

This will set the image parameters, this is only valid for BI operators.

public String

Returns:

A string rep of this class.
toString
()

Overrides java.lang.Object.toString.

This will print a string rep of this class.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

imageDataback to summary
private byte[] imageData
imageParametersback to summary
private COSDictionary imageParameters
operatorsback to summary
private static final ConcurrentMap<String, Operator> operators

map for singleton operator objects; use ConcurrentHashMap for better scalability with multiple threads

theOperatorback to summary
private final String theOperator

Constructor Detail

Operatorback to summary
private Operator(String aOperator)

Constructor.

Parameters
aOperator:String

The operator that this object will represent.

Exceptions
IllegalArgumentException:
if the operator starts with "/".

Method Detail

getImageDataback to summary
public byte[] getImageData()

This is the special case for the ID operator where there are just random bytes inlined the stream.

Returns:byte[]

Value of property imageData.

getImageParametersback to summary
public COSDictionary getImageParameters()

This will get the image parameters, this is only valid for BI operators.

Returns:COSDictionary

The image parameters.

getNameback to summary
public String getName()

This will get the name of the operator.

Returns:String

The string representation of the operation.

getOperatorback to summary
public static Operator getOperator(String operator)

This is used to create/cache operators in the system.

Parameters
operator:String

The operator for the system.

Returns:Operator

The operator that matches the operator keyword.

setImageDataback to summary
public void setImageData(byte[] imageDataArray)

This will set the image data, this is only used for the ID operator.

Parameters
imageDataArray:byte[]

New value of property imageData.

setImageParametersback to summary
public void setImageParameters(COSDictionary params)

This will set the image parameters, this is only valid for BI operators.

Parameters
params:COSDictionary

The image parameters.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

This will print a string rep of this class.

Returns:String

A string rep of this class.

Annotations
@Override