Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for buf (0.13 sec)

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

        assertEquals(4, numOfByteRead);
    
        assertEquals(expectedHash, in.hash());
      }
    
      public void testHash_hashesCorrectlyReadOutOfBound() throws Exception {
        HashCode expectedHash = Hashing.md5().hashBytes(testBytes);
        HashingInputStream in = new HashingInputStream(Hashing.md5(), buffer);
    
        byte[] buf = new byte[100];
        int numOfByteRead = in.read(buf, 0, buf.length);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/io/LineReader.java

          // temporary char[], so we call Reader#read(char[], int, int) instead.
          int read = (reader != null) ? reader.read(buf, 0, buf.length) : readable.read(cbuf);
          if (read == -1) {
            lineBuf.finish();
            break;
          }
          lineBuf.add(buf, 0, read);
        }
        return lines.poll();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/IoTestCase.java

        InputStream in = url.openStream();
        try {
          OutputStream out = new FileOutputStream(file);
          try {
            byte[] buf = new byte[4096];
            for (int read = in.read(buf); read != -1; read = in.read(buf)) {
              out.write(buf, 0, read);
            }
          } finally {
            out.close();
          }
        } finally {
          in.close();
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/primitives/UnsignedLongs.java

            }
            long rem = x - quotient * radix;
            buf[--i] = Character.forDigit((int) rem, radix);
            x = quotient;
            // Simple modulo/division approach
            while (x > 0) {
              buf[--i] = Character.forDigit((int) (x % radix), radix);
              x /= radix;
            }
          }
          // Generate string
          return new String(buf, i, buf.length - i);
        }
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 17.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/CharSequenceReaderTest.java

        char[] buf = new char[10];
        assertThrows(IndexOutOfBoundsException.class, () -> reader.read(buf, 0, 11));
    
        assertThrows(IndexOutOfBoundsException.class, () -> reader.read(buf, 10, 1));
    
        assertThrows(IndexOutOfBoundsException.class, () -> reader.read(buf, 11, 0));
    
        assertThrows(IndexOutOfBoundsException.class, () -> reader.read(buf, -1, 5));
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/CharSourceTest.java

        assertTrue(source.wasStreamOpened());
        assertFalse(source.wasStreamClosed());
    
        StringWriter writer = new StringWriter();
        char[] buf = new char[64];
        int read;
        while ((read = reader.read(buf)) != -1) {
          writer.write(buf, 0, read);
        }
        reader.close();
        writer.close();
    
        assertTrue(source.wasStreamClosed());
        assertEquals(STRING, writer.toString());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

          h ^= fingerprint(buf, bufLen);
          h = remix(h);
          buf[bufLen++] = getChar(h);
    
          int x0 = buf[bufLen - 1] & 0xff;
          int x1 = buf[bufLen - 2] & 0xff;
          int x2 = buf[bufLen - 3] & 0xff;
          int x3 = buf[bufLen / 2] & 0xff;
          buf[((x0 << 16) + (x1 << 8) + x2) % bufLen] ^= x3;
          buf[((x1 << 16) + (x2 << 8) + x3) % bufLen] ^= i % 256;
        }
    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)
  8. guava-tests/test/com/google/common/io/CharSequenceReaderTest.java

        char[] buf = new char[10];
        assertThrows(IndexOutOfBoundsException.class, () -> reader.read(buf, 0, 11));
    
        assertThrows(IndexOutOfBoundsException.class, () -> reader.read(buf, 10, 1));
    
        assertThrows(IndexOutOfBoundsException.class, () -> reader.read(buf, 11, 0));
    
        assertThrows(IndexOutOfBoundsException.class, () -> reader.read(buf, -1, 5));
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/hash/HashingInputStreamTest.java

        assertEquals(4, numOfByteRead);
    
        assertEquals(expectedHash, in.hash());
      }
    
      public void testHash_hashesCorrectlyReadOutOfBound() throws Exception {
        HashCode expectedHash = Hashing.md5().hashBytes(testBytes);
        HashingInputStream in = new HashingInputStream(Hashing.md5(), buffer);
    
        byte[] buf = new byte[100];
        int numOfByteRead = in.read(buf, 0, buf.length);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/hash/Fingerprint2011Test.java

          h ^= fingerprint(buf, bufLen);
          h = remix(h);
          buf[bufLen++] = getChar(h);
    
          int x0 = buf[bufLen - 1] & 0xff;
          int x1 = buf[bufLen - 2] & 0xff;
          int x2 = buf[bufLen - 3] & 0xff;
          int x3 = buf[bufLen / 2] & 0xff;
          buf[((x0 << 16) + (x1 << 8) + x2) % bufLen] ^= x3;
          buf[((x1 << 16) + (x2 << 8) + x3) % bufLen] ^= i % 256;
        }
    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)
Back to top