Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.util
Class IDUtil

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

    public class IDUtil

extends Object

helper class to generate pseudo-GUID sequences.

Method Summary
`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 byte[]` | `pseudoUniqueByteSequence16()`
`static byte[]` | `pseudoUniqueByteSequence8()`
`static byte[]` | `pseudoUniqueSecureByteSequence(int length)`
`static byte[]` | `pseudoUniqueSecureByteSequence16()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2010 Apache Cayenne. All Rights Reserved.