Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 65 for SetBytes (0.19 sec)

  1. android/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 26 12:43:10 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/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 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 15:56:47 GMT 2017
    - 6.2K bytes
    - Viewed (0)
  3. 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)
  4. android/guava-tests/test/com/google/common/hash/Crc32cHashFunctionTest.java

      public void testSomeOtherKnownValues() {
        assertCrc(0x22620404, "The quick brown fox jumps over the lazy dog".getBytes(UTF_8));
        assertCrc(0xE3069283, "123456789".getBytes(UTF_8));
        assertCrc(0xf3dbd4fe, "1234567890".getBytes(UTF_8));
        assertCrc(0xBFE92A83, "23456789".getBytes(UTF_8));
      }
    
      public void testAgainstSimplerImplementation() {
        Random r = new Random(1234567);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 23 18:30:33 GMT 2020
    - 6.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/BaseEncodingTest.java

        assertThat(encoding.encode(decoded.getBytes(UTF_8))).isEqualTo(encoded);
      }
    
      private static void testEncodesWithOffset(
          BaseEncoding encoding, String decoded, int offset, int len, String encoded) {
        assertThat(encoding.encode(decoded.getBytes(UTF_8), offset, len)).isEqualTo(encoded);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Aug 25 16:34:08 GMT 2022
    - 24.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/ByteSourceTester.java

            suite.addTest(
                suiteForBytes(
                    factory, entry.getValue().getBytes(Charsets.UTF_8), name, entry.getKey(), true));
          }
        }
        return suite;
      }
    
      static TestSuite suiteForString(
          ByteSourceFactory factory, String string, String name, String desc) {
        TestSuite suite = suiteForBytes(factory, string.getBytes(Charsets.UTF_8), name, desc, true);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/TestCharSink.java

      private final TestByteSink byteSink;
    
      public TestCharSink(TestOption... options) {
        this.byteSink = new TestByteSink(options);
      }
    
      public String getString() {
        return new String(byteSink.getBytes(), UTF_8);
      }
    
      @Override
      public boolean wasStreamOpened() {
        return byteSink.wasStreamOpened();
      }
    
      @Override
      public boolean wasStreamClosed() {
        return byteSink.wasStreamClosed();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Apr 21 02:27:51 GMT 2017
    - 2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/ByteArrayDataOutput.java

      void writeChars(String s);
    
      @Override
      void writeUTF(String s);
    
      /**
       * @deprecated This method is dangerous as it discards the high byte of every character. For
       *     UTF-8, use {@code write(s.getBytes(StandardCharsets.UTF_8))}.
       */
      @Deprecated
      @Override
      void writeBytes(String s);
    
      /** Returns the contents that have been written to this instance, as a byte array. */
      byte[] toByteArray();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/base/Utf8.java

    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    public final class Utf8 {
      /**
       * Returns the number of bytes in the UTF-8-encoded form of {@code sequence}. For a string, this
       * method is equivalent to {@code string.getBytes(UTF_8).length}, but is more efficient in both
       * time and space.
       *
       * @throws IllegalArgumentException if {@code sequence} contains ill-formed UTF-16 (unpaired
       *     surrogates)
       */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 10 14:11:51 GMT 2023
    - 7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/hash/Hasher.java

       */
      @CanIgnoreReturnValue
      @Override
      Hasher putUnencodedChars(CharSequence charSequence);
    
      /**
       * Equivalent to {@code putBytes(charSequence.toString().getBytes(charset))}.
       *
       * <p><b>Warning:</b> This method, which reencodes the input before hashing it, is useful only for
       * cross-language compatibility. For other use cases, prefer {@link #putUnencodedChars}, which is
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 5.5K bytes
    - Viewed (0)
Back to top