Package io.keikai.util
Interface Oid
public interface Oid
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int[]static final intstatic final intstatic final intstatic final Patternstatic final SecureRandomstatic final int -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic int_escOid(int v) static int[]getRandomInts(int length) The function used to generate a list of random integers to construct OID.static booleanisValidOid(String value) static StringCreates a new OID based two OIDs.static StringnextOid()Returns the next unique object ID.
-
Field Details
-
OID_LENGTH
static final int OID_LENGTH- See Also:
-
_CC_EXTRA
static final int[] _CC_EXTRA -
_CC_RANGE
static final int _CC_RANGE- See Also:
-
_CC_0
static final int _CC_0- See Also:
-
_CC_A
static final int _CC_A- See Also:
-
_CC_a
static final int _CC_a- See Also:
-
_INT_LEN
static final int _INT_LEN- See Also:
-
_CHAR_PER_INT
static final int _CHAR_PER_INT- See Also:
-
_oidPattern
-
_random
-
-
Method Details
-
nextOid
Returns the next unique object ID. -
mergeOid
Creates a new OID based two OIDs.> To shorten the result OID, we retrieve the substring of [oid1] and [oid2] and concatenate them together. Of course, there might be conflict but the chance is so low that we can ignore (like OID generator),
-
isValidOid
-
getRandomInts
static int[] getRandomInts(int length) The function used to generate a list of random integers to construct OID.The default implementation uses [Random] to generate the random number. When running at the browser, it is better to replace with `Crypto.getRandomValues`.
-
_escOid
static int _escOid(int v)
-