Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 35 of 35 for nextBytes (0.06 sec)

  1. android/guava-tests/test/com/google/common/io/FilesTest.java

        byte[] bytes = newPreFilledByteArray(1024);
    
        // Setup
        File file = createTempFile();
        Files.write(bytes, file);
    
        Random random = new Random();
        random.nextBytes(expectedBytes);
    
        // Test
        MappedByteBuffer map = Files.map(file, MapMode.READ_WRITE);
        map.put(expectedBytes);
    
        // Verify
        byte[] actualBytes = Files.toByteArray(file);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

      private var awaitingPong = false
    
      init {
        require("GET" == originalRequest.method) {
          "Request must be GET: ${originalRequest.method}"
        }
    
        this.key = ByteArray(16).apply { random.nextBytes(this) }.toByteString().base64()
      }
    
      override fun request(): Request = originalRequest
    
      @Synchronized override fun queueSize(): Long = queueSize
    
      override fun cancel() {
        call!!.cancel()
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/FilesTest.java

        byte[] bytes = newPreFilledByteArray(1024);
    
        // Setup
        File file = createTempFile();
        Files.write(bytes, file);
    
        Random random = new Random();
        random.nextBytes(expectedBytes);
    
        // Test
        MappedByteBuffer map = Files.map(file, MapMode.READ_WRITE);
        map.put(expectedBytes);
    
        // Verify
        byte[] actualBytes = Files.toByteArray(file);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/primitives/IntsTest.java

        // total overkill, but, it takes 0.1 sec so why not...
        for (int i = 0; i < 10000; i++) {
          int num = r.nextInt();
          assertThat(Ints.fromByteArray(Ints.toByteArray(num))).isEqualTo(num);
    
          r.nextBytes(b);
          assertThat(Ints.toByteArray(Ints.fromByteArray(b))).isEqualTo(b);
        }
      }
    
      public void testEnsureCapacity() {
        assertThat(Ints.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 29.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/primitives/LongsTest.java

        byte[] b = new byte[Longs.BYTES];
    
        for (int i = 0; i < 1000; i++) {
          long num = r.nextLong();
          assertThat(Longs.fromByteArray(Longs.toByteArray(num))).isEqualTo(num);
    
          r.nextBytes(b);
          long value = Longs.fromByteArray(b);
          assertWithMessage("" + value).that(Arrays.equals(b, Longs.toByteArray(value))).isTrue();
        }
      }
    
      public void testEnsureCapacity() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 29.8K bytes
    - Viewed (0)
Back to top