org.pdfbox.util
Class BitFlagHelper
java.lang.Object
org.pdfbox.util.BitFlagHelper
public class BitFlagHelper
extends java.lang.Object
This class will be used for bit flag operations.
static boolean | getFlag(COSDictionary dic, String field, int bitFlag) - Gets the boolean value from the flags at the given bit
position.
|
static void | setFlag(COSDictionary dic, String field, int bitFlag, boolean value) - Sets the given boolean value at bitPos in the flags.
|
getFlag
public static final boolean getFlag(COSDictionary dic,
String field,
int bitFlag)
Gets the boolean value from the flags at the given bit
position.
dic
- The dictionary to get the field from.field
- The name of the field to get the flag from.bitFlag
- the bitPosition to get the value from.
- true if the number at bitPos is '1'
setFlag
public static final void setFlag(COSDictionary dic,
String field,
int bitFlag,
boolean value)
Sets the given boolean value at bitPos in the flags.
dic
- The dictionary to set the value into.field
- The name of the field to set the value into.bitFlag
- the bit position to set the value in.value
- the value the bit position should have.