|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.asn1.primitives.BitString
org.apache.directory.server.kerberos.shared.messages.value.flags.AbstractKerberosFlags
public abstract class AbstractKerberosFlags
An implementation of a BitString for any KerberosFlags. The different values are stored in an int, as there can't be more than 32 flags (TicketFlag). Some basic operations are implemented in this abstract class, like those manipulating flags.
Field Summary | |
---|---|
static int |
MAX_SIZE
The maximum size of the BitString as specified for Kerberos flags. |
protected int |
value
The associated value |
Fields inherited from class org.apache.directory.shared.asn1.primitives.BitString |
---|
EMPTY_STRING, STREAMED |
Constructor Summary | |
---|---|
AbstractKerberosFlags()
Standard constructor, which create a BitString containing 32 bits |
|
AbstractKerberosFlags(byte[] flags)
Standard constructor, taking a byte array |
Method Summary | |
---|---|
void |
clearFlag(int flag)
clear a flag in a list of flags |
void |
clearFlag(KerberosFlag flag)
clear a flag in a list of flags |
byte[] |
getBytes()
|
static byte[] |
getBytes(int flags)
A static method to get the bayte array representation of an int |
int |
getHexValue()
|
int |
getIntValue()
Returns the int value associated with the flags |
boolean |
isFlagSet(int flag)
Check if a flag is set |
static boolean |
isFlagSet(int flags,
int flag)
Check if a flag is set |
boolean |
isFlagSet(KerberosFlag flag)
Check if a flag is set for the actual value |
void |
setFlag(int flag)
Set a flag in a list of flags |
void |
setFlag(KerberosFlag flag)
Set a flag in a list of flags |
void |
setFlags(byte[] bytes)
Modify a byte array to an integer value |
Methods inherited from class org.apache.directory.shared.asn1.primitives.BitString |
---|
clearBit, getBit, getData, getUnusedBits, isStreamed, setBit, setData, size, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_SIZE
protected int value
Constructor Detail |
---|
public AbstractKerberosFlags()
public AbstractKerberosFlags(byte[] flags)
Method Detail |
---|
public static byte[] getBytes(int flags)
public byte[] getBytes()
getBytes
in interface KerberosFlags
public int getIntValue()
getIntValue
in interface KerberosFlags
public static boolean isFlagSet(int flags, int flag)
flags
- The flags to testflag
- The flag to check
public boolean isFlagSet(KerberosFlag flag)
isFlagSet
in interface KerberosFlags
flag
- The flag to check
public boolean isFlagSet(int flag)
isFlagSet
in interface KerberosFlags
flag
- The flags to test
public void setFlag(KerberosFlag flag)
setFlag
in interface KerberosFlags
flag
- The flag to setpublic void setFlag(int flag)
setFlag
in interface KerberosFlags
flag
- The flag to setpublic void setFlags(byte[] bytes)
bytes
- The 4 bytes byte array to transform.public void clearFlag(KerberosFlag flag)
clearFlag
in interface KerberosFlags
flag
- The flag to setpublic void clearFlag(int flag)
clearFlag
in interface KerberosFlags
flag
- The flag to setpublic int getHexValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |