Package org.apache.pdfbox.util
Class BitFlagHelper
- java.lang.Object
-
- org.apache.pdfbox.util.BitFlagHelper
-
public class BitFlagHelper extends java.lang.Object
This class will be used for bit flag operations.- Version:
- $Revision: 1.4 $
- Author:
- Ben Litchfield
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
getFlag(COSDictionary dic, java.lang.String field, int bitFlag)
Deprecated.usegetFlag(COSDictionary, COSName, int)
using COSName constants insteadstatic boolean
getFlag(COSDictionary dic, COSName field, int bitFlag)
Gets the boolean value from the flags at the given bit position.static void
setFlag(COSDictionary dic, java.lang.String field, int bitFlag, boolean value)
Deprecated.usesetFlag(COSDictionary, COSName, int, boolean)
using COSName constants insteadstatic void
setFlag(COSDictionary dic, COSName field, int bitFlag, boolean value)
Sets the given boolean value at bitPos in the flags.
-
-
-
Method Detail
-
setFlag
public static final void setFlag(COSDictionary dic, java.lang.String field, int bitFlag, boolean value)
Deprecated.usesetFlag(COSDictionary, COSName, int, boolean)
using COSName constants insteadSets the given boolean value at bitPos in the flags.- Parameters:
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.
-
setFlag
public static final void setFlag(COSDictionary dic, COSName field, int bitFlag, boolean value)
Sets the given boolean value at bitPos in the flags.- Parameters:
dic
- The dictionary to set the value into.field
- The COSName 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.
-
getFlag
public static final boolean getFlag(COSDictionary dic, java.lang.String field, int bitFlag)
Deprecated.usegetFlag(COSDictionary, COSName, int)
using COSName constants insteadGets the boolean value from the flags at the given bit position.- Parameters:
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.- Returns:
- true if the number at bitPos is '1'
-
getFlag
public static final boolean getFlag(COSDictionary dic, COSName field, int bitFlag)
Gets the boolean value from the flags at the given bit position.- Parameters:
dic
- The dictionary to get the field from.field
- The COSName of the field to get the flag from.bitFlag
- the bitPosition to get the value from.- Returns:
- true if the number at bitPos is '1'
-
-