Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 222 for getBytes (0.18 sec)

  1. guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

          new SecretKeySpec("secret key".getBytes(UTF_8), "HmacMD5");
      private static final SecretKey SHA1_KEY =
          new SecretKeySpec("secret key".getBytes(UTF_8), "HmacSHA1");
      private static final SecretKey SHA256_KEY =
          new SecretKeySpec("secret key".getBytes(UTF_8), "HmacSHA256");
      private static final SecretKey SHA512_KEY =
          new SecretKeySpec("secret key".getBytes(UTF_8), "HmacSHA512");
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/Fingerprint2011Test.java

        assertThat(fingerprint(stringA.getBytes(UTF_8)))
            .isNotEqualTo(fingerprint(stringB.getBytes(UTF_8)));
    
        // ISO 8859-1 only has 0-255 (ubyte) representation so throws away UTF-8 characters
        // greater than 127 (ie with their top bit set).
        // Don't attempt to do this in real code.
        assertEquals(
            fingerprint(stringA.getBytes(ISO_8859_1)), fingerprint(stringB.getBytes(ISO_8859_1)));
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Dec 29 14:55:25 GMT 2021
    - 7.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/base/CharsetsTest.java

      @GwtIncompatible // Non-UTF-8 Charset
      public void testWhyUsAsciiIsDangerous() {
        byte[] b1 = "朝日新聞".getBytes(Charsets.US_ASCII);
        byte[] b2 = "聞朝日新".getBytes(Charsets.US_ASCII);
        byte[] b3 = "????".getBytes(Charsets.US_ASCII);
        byte[] b4 = "ニュース".getBytes(Charsets.US_ASCII);
        byte[] b5 = "スューー".getBytes(Charsets.US_ASCII);
        // Assert they are all equal (using the transitive property)
        assertTrue(Arrays.equals(b1, b2));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu May 04 09:41:29 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

        assertThat(fingerprint(stringA.getBytes(UTF_8)))
            .isNotEqualTo(fingerprint(stringB.getBytes(UTF_8)));
    
        // ISO 8859-1 only has 0-255 (ubyte) representation so throws away UTF-8 characters
        // greater than 127 (ie with their top bit set).
        // Don't attempt to do this in real code.
        assertEquals(
            fingerprint(stringA.getBytes(ISO_8859_1)), fingerprint(stringB.getBytes(ISO_8859_1)));
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jul 19 14:00:24 GMT 2016
    - 6.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        assertHash(expected, murmur3_32().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32_fixed().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32().newHasher().putBytes(string.getBytes(charset)).hash());
        assertHash(expected, murmur3_32_fixed().newHasher().putBytes(string.getBytes(charset)).hash());
      }
    
      private boolean allBmp(String string) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        assertHash(expected, murmur3_32().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32_fixed().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32().newHasher().putBytes(string.getBytes(charset)).hash());
        assertHash(expected, murmur3_32_fixed().newHasher().putBytes(string.getBytes(charset)).hash());
      }
    
      private boolean allBmp(String string) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/ByteSinkTest.java

        assertTrue(sink.wasStreamClosed());
        assertArrayEquals(new byte[] {1, 2, 3, 4}, sink.getBytes());
      }
    
      public void testWrite_bytes() throws IOException {
        assertArrayEquals(new byte[0], sink.getBytes());
        sink.write(bytes);
    
        assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed());
        assertArrayEquals(bytes, sink.getBytes());
      }
    
      public void testWriteFrom_inputStream() throws IOException {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/base/CharsetsTest.java

      @GwtIncompatible // Non-UTF-8 Charset
      public void testWhyUsAsciiIsDangerous() {
        byte[] b1 = "朝日新聞".getBytes(Charsets.US_ASCII);
        byte[] b2 = "聞朝日新".getBytes(Charsets.US_ASCII);
        byte[] b3 = "????".getBytes(Charsets.US_ASCII);
        byte[] b4 = "ニュース".getBytes(Charsets.US_ASCII);
        byte[] b5 = "スューー".getBytes(Charsets.US_ASCII);
        // Assert they are all equal (using the transitive property)
        assertTrue(Arrays.equals(b1, b2));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu May 04 09:41:29 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  9. src/main/java/jcifs/util/Strings.java

         */
        public static byte[] getBytes ( String str, Charset encoding ) {
            if ( str == null ) {
                return new byte[0];
            }
            return str.getBytes(encoding);
        }
    
    
        /**
         * 
         * @param str
         * @return the string as bytes (UTF16-LE)
         */
        public static byte[] getUNIBytes ( String str ) {
            return getBytes(str, UNI_ENCODING);
        }
    
    
        /**
    Java
    - Registered: Sun Apr 21 00:10:10 GMT 2024
    - Last Modified: Mon Mar 13 12:00:57 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/app/service/SearchLogService.java

                return buckets.stream().map(e -> {
                    final Map<String, Object> map = new HashMap<>();
                    map.put(ID, Base64.getUrlEncoder().encodeToString(e.getKeyAsString().getBytes(StandardCharsets.UTF_8)));
                    map.put(KEY, e.getKeyAsString());
                    map.put(COUNT, e.getDocCount());
                    return map;
                }).collect(Collectors.toList());
    Java
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 28.4K bytes
    - Viewed (0)
Back to top