Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for toHex (2.14 sec)

  1. src/main/java/org/codelibs/core/net/UuidUtil.java

        private static final SecureRandom RANDOM = new SecureRandom();
    
        private static final String BASE = StringUtil.toHex(getAddress()) + StringUtil.toHex(System.identityHashCode(RANDOM));
    
        /**
         * Creates a UUID.
         *
         * @return the UUID string
         */
        public static String create() {
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/lang/StringUtilTest.java

         */
        @Test
        public void testToHex() throws Exception {
            assertEquals("010203", StringUtil.toHex(new byte[] { 1, 2, 3 }));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testToHex2() throws Exception {
            assertEquals("0001", StringUtil.toHex(1));
        }
    
        /**
         * @throws Exception
         */
        @Test
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 12K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/lang/StringUtil.java

        }
    
        /**
         * Converts a byte array to a hexadecimal string.
         *
         * @param bytes
         *            the byte array
         * @return the hexadecimal string
         */
        public static String toHex(final byte[] bytes) {
            if (bytes == null) {
                return "";
            }
            final StringBuilder sb = new StringBuilder(bytes.length * 2);
            for (final byte b : bytes) {
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 21.9K bytes
    - Viewed (0)
Back to top