IDUtil (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.util, class: IDUtil

# Class IDUtil

java.lang.Object
org.apache.cayenne.util.IDUtil

public class IDUtil extends Object
helper class to generate pseudo-GUID sequences.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `appendFormattedByte(Appendable buffer, byte byteValue)`
  Prints a byte value to a StringBuffer as a double digit hex value.
  `static byte[]`
  `pseudoUniqueByteSequence(int length)`
  `static final byte[]`
  `pseudoUniqueByteSequence16()`
  `static final byte[]`
  `pseudoUniqueByteSequence8()`
  `static byte[]`
  `pseudoUniqueSecureByteSequence(int length)`
  `static byte[]`
  `pseudoUniqueSecureByteSequence16()`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### appendFormattedByte

    public static void appendFormattedByte(Appendable buffer, byte byteValue)
    Prints a byte value to a StringBuffer as a double digit hex value.
    Since:
      1.2 Since 3.0 signature has changed to take Appendable argument.

  - ### pseudoUniqueByteSequence

    public static byte[] pseudoUniqueByteSequence(int length)
    Parameters:
      `length` - the length of returned byte[]
    Returns:
      A pseudo-unique byte array of the specified length. Length must be at least 16 bytes, or an exception is thrown.
    Since:
      1.0.2

  - ### pseudoUniqueSecureByteSequence

    public static byte[] pseudoUniqueSecureByteSequence(int length)

  - ### pseudoUniqueByteSequence8

    public static final byte[] pseudoUniqueByteSequence8()

  - ### pseudoUniqueByteSequence16

    public static final byte[] pseudoUniqueByteSequence16()
    Returns:
      A pseudo unique 16-byte array.

  - ### pseudoUniqueSecureByteSequence16

    public static byte[] pseudoUniqueSecureByteSequence16()
    Returns:
      A pseudo unique digested 16-byte array.