UUIDGenerator (Apache Tomcat 8.5.96 API Documentation)

Package org.apache.catalina.tribes.util

## Class UUIDGenerator

- java.lang.Object
- - org.apache.catalina.tribes.util.UUIDGenerator

-     public class UUIDGenerator
      extends java.lang.Object

  Smple generation of a UUID.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `BITS_PER_BYTE` |
    `static int` | `BYTES_PER_INT` |
    `protected static java.util.Random` | `rand` |
    `protected static java.security.SecureRandom` | `secrand` |
    `protected static StringManager` | `sm` |
    `static int` | `UUID_LENGTH` |
    `static int` | `UUID_VERSION` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `UUIDGenerator()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `nextBytes​(byte[] into, int offset, int length, java.util.Random r)` | Same as java.util.Random.nextBytes except this one we don't have to allocate a new byte array
    `static byte[]` | `randomUUID​(boolean secure)` |
    `static byte[]` | `randomUUID​(boolean secure, byte[] into, int offset)` |

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### sm

          protected static final StringManager sm

    - #### UUID_LENGTH

          public static final int UUID_LENGTH

      See Also:
        Constant Field Values

    - #### UUID_VERSION

          public static final int UUID_VERSION

      See Also:
        Constant Field Values

    - #### BYTES_PER_INT

          public static final int BYTES_PER_INT

      See Also:
        Constant Field Values

    - #### BITS_PER_BYTE

          public static final int BITS_PER_BYTE

      See Also:
        Constant Field Values

    - #### secrand

          protected static final java.security.SecureRandom secrand

    - #### rand

          protected static final java.util.Random rand

  - ### Constructor Detail

    - #### UUIDGenerator

          public UUIDGenerator()

  - ### Method Detail

    - #### randomUUID

          public static byte[] randomUUID​(boolean secure)

    - #### randomUUID

          public static byte[] randomUUID​(boolean secure,
                                          byte[] into,
                                          int offset)

    - #### nextBytes

          public static void nextBytes​(byte[] into,
                                       int offset,
                                       int length,
                                       java.util.Random r)

      Same as java.util.Random.nextBytes except this one we don't have to allocate a new byte array
      Parameters:
        `into` - byte[]
        `offset` - int
        `length` - int
        `r` - Random