Class Operator
java.lang.Object
org.apache.pdfbox.contentstream.operator.Operator
An Operator in a PDF content stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]
private COSDictionary
private static final ConcurrentMap<String,
Operator> map for singleton operator objects; useConcurrentHashMap
for better scalability with multiple threadsprivate final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
This is the special case for the ID operator where there are just random bytes inlined the stream.This will get the image parameters, this is only valid for BI operators.getName()
This will get the name of the operator.static Operator
getOperator
(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.toString()
This will print a string rep of this class.
-
Field Details
-
theOperator
-
imageData
private byte[] imageData -
imageParameters
-
operators
map for singleton operator objects; useConcurrentHashMap
for better scalability with multiple threads
-
-
Constructor Details
-
Operator
Constructor.- Parameters:
aOperator
- The operator that this object will represent.- Throws:
IllegalArgumentException
- if the operator starts with "/".
-
-
Method Details
-
getOperator
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
This will get the name of the operator.- Returns:
- The string representation of the operation.
-
toString
This will print 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
This will get the image parameters, this is only valid for BI operators.- Returns:
- The image parameters.
-
setImageParameters
This will set the image parameters, this is only valid for BI operators.- Parameters:
params
- The image parameters.
-