Class Operator
- java.lang.Object
-
- org.apache.pdfbox.contentstream.operator.Operator
-
public final class Operator extends java.lang.Object
An Operator in a PDF content stream.
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
imageData
private COSDictionary
imageParameters
private static java.util.concurrent.ConcurrentMap<java.lang.String,Operator>
operators
map for singleton operator objects; useConcurrentHashMap
for better scalability with multiple threadsprivate java.lang.String
theOperator
-
Constructor Summary
Constructors Modifier Constructor Description private
Operator(java.lang.String aOperator)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getImageData()
This is the special case for the ID operator where there are just random bytes inlined the stream.COSDictionary
getImageParameters()
This will get the image parameters, this is only valid for BI operators.java.lang.String
getName()
This will get the name of the operator.static Operator
getOperator(java.lang.String operator)
This is used to create/cache operators in the system.void
setImageData(byte[] imageDataArray)
This will set the image data, this is only used for the ID operator.void
setImageParameters(COSDictionary params)
This will set the image parameters, this is only valid for BI operators.java.lang.String
toString()
This will print a string rep of this class.
-
-
-
Field Detail
-
theOperator
private final java.lang.String theOperator
-
imageData
private byte[] imageData
-
imageParameters
private COSDictionary imageParameters
-
operators
private static final java.util.concurrent.ConcurrentMap<java.lang.String,Operator> operators
map for singleton operator objects; useConcurrentHashMap
for better scalability with multiple threads
-
-
Method Detail
-
getOperator
public static Operator getOperator(java.lang.String operator)
This is used to create/cache operators in the system.- Parameters:
operator
- The operator for the system.- Returns:
- The operator that matches the operator keyword.
-
getName
public java.lang.String getName()
This will get the name of the operator.- Returns:
- The string representation of the operation.
-
toString
public java.lang.String toString()
This will print a string rep of this class.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string rep of this class.
-
getImageData
public byte[] getImageData()
This is the special case for the ID operator where there are just random bytes inlined the stream.- Returns:
- Value of property imageData.
-
setImageData
public void setImageData(byte[] imageDataArray)
This will set the image data, this is only used for the ID operator.- Parameters:
imageDataArray
- New value of property imageData.
-
getImageParameters
public COSDictionary getImageParameters()
This will get the image parameters, this is only valid for BI operators.- Returns:
- The image parameters.
-
setImageParameters
public void setImageParameters(COSDictionary params)
This will set the image parameters, this is only valid for BI operators.- Parameters:
params
- The image parameters.
-
-