Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 470 for bytes (0.13 sec)

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

        byte[] bytes = HashTestUtils.ascii(input);
    
        Checksum checksum = supplier.get();
        checksum.update(bytes, 0, bytes.length);
        long value = checksum.getValue();
    
        String toString = "name";
        HashFunction func = new ChecksumHashFunction(supplier, 32, toString);
        assertEquals(toString, func.toString());
        assertEquals(value, func.hashBytes(bytes).padToLong());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jan 30 14:33:12 GMT 2018
    - 3.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/ByteSinkTest.java

        assertFalse(sink.wasStreamClosed());
    
        out.write(new byte[] {1, 2, 3, 4});
        out.close();
    
        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());
    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)
  3. guava-tests/test/com/google/common/hash/Fingerprint2011Test.java

      }
    
      /** Convenience method to compute a fingerprint on a full bytes array. */
      private static long fingerprint(byte[] bytes) {
        return fingerprint(bytes, bytes.length);
      }
    
      /** Convenience method to compute a fingerprint on a subset of a byte array. */
      private static long fingerprint(byte[] bytes, int length) {
        return HASH_FN.hashBytes(bytes, 0, length).asLong();
      }
    
      /**
    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)
  4. android/guava-tests/test/com/google/common/io/ByteSourceTester.java

      }
    
      static TestSuite suiteForBytes(
          ByteSourceFactory factory, byte[] bytes, String name, String desc, boolean slice) {
        TestSuite suite = new TestSuite(name + " [" + desc + "]");
        for (Method method : testMethods) {
          suite.addTest(new ByteSourceTester(factory, bytes, name, desc, method));
        }
    
        if (slice && bytes.length > 0) {
          // test a random slice() of the ByteSource
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

      }
    
      /** Convenience method to compute a fingerprint on a full bytes array. */
      private static long fingerprint(byte[] bytes) {
        return fingerprint(bytes, bytes.length);
      }
    
      /** Convenience method to compute a fingerprint on a subset of a byte array. */
      private static long fingerprint(byte[] bytes, int length) {
        return HASH_FN.hashBytes(bytes, 0, length).asLong();
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jun 26 15:56:47 GMT 2017
    - 6.2K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb1/ntlmssp/Type3Message.java

                    byte[] userSessionKey = hmac.digest();
    
                    if ((getFlags() & NTLMSSP_NEGOTIATE_KEY_EXCH) != 0) {
                        masterKey = new byte[16];
                        RANDOM.nextBytes(masterKey);
    
                        byte[] exchangedKey = new byte[16];
                        RC4 rc4 = new RC4(userSessionKey);
                        rc4.update(masterKey, 0, 16, exchangedKey, 0);
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 22.9K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/io/SerializeUtil.java

        }
    
        /**
         * {@literal byte}の配列をオブジェクトに変換します。
         *
         * @param bytes
         *            デシリアライズする配列。{@literal null}や空配列であってはいけません
         * @return 復元したオブジェクト
         */
        public static Object fromBinaryToObject(final byte[] bytes) {
            assertArgumentNotEmpty("bytes", bytes);
    
            try {
                final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/smb1/SmbFileOutputStream.java

            tmp = null;
        }
    
    /**
     * Writes the specified byte to this file output stream.
     *
     * @throws IOException if a network error occurs
     */
    
        public void write( int b ) throws IOException {
            tmp[0] = (byte)b;
            write( tmp, 0, 1 );
        }
    
    /**
     * Writes b.length bytes from the specified byte array to this
     * file output stream.
     *
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 9.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/hash/Crc32cHashFunctionTest.java

        for (int length = 0; length < 1000; length++) {
          byte[] bytes = new byte[length];
          r.nextBytes(bytes);
          assertCrc(referenceCrc(bytes), bytes);
        }
      }
    
      private static int referenceCrc(byte[] bytes) {
        int crc = ~0;
        for (byte b : bytes) {
          crc = (crc >>> 8) ^ Crc32cHashFunction.Crc32cHasher.BYTE_TABLE[(crc ^ b) & 0xFF];
        }
        return ~crc;
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Dec 23 18:30:33 GMT 2020
    - 6.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/hash/FunnelsTest.java

        PrimitiveSink sink = mock(PrimitiveSink.class);
        OutputStream out = Funnels.asOutputStream(sink);
        byte[] bytes = {1, 2, 3, 4};
        out.write(255);
        out.write(bytes);
        out.write(bytes, 1, 2);
        verify(sink).putByte((byte) 255);
        verify(sink).putBytes(bytes);
        verify(sink).putBytes(bytes, 1, 2);
      }
    
      public void testSerialization() {
        assertSame(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5.9K bytes
    - Viewed (0)
Back to top