Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 865 for closer (0.15 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

        ) {
          check(!closed) { "closed" }
          checkOffsetAndCount(source.size, 0, byteCount)
          socket.sink.write(source, byteCount)
        }
    
        override fun flush() {
          if (closed) return // Don't throw; this stream might have been closed on the caller's behalf.
          socket.sink.flush()
        }
    
        override fun close() {
          if (closed) return
          closed = true
          detachTimeout(timeout)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 17.5K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/cache2/RelayTest.kt

        val relay = edit(file, upstream, metadata, 1024)
        val source1 = relay.newSource()
        val source2 = relay.newSource()
        source1!!.close()
        source1.close() // Unnecessary. Shouldn't decrement the reference count.
        assertThat(relay.isClosed).isFalse()
        source2!!.close()
        assertThat(relay.isClosed).isTrue()
        assertFile(Relay.PREFIX_DIRTY, -1L, -1, null, null)
      }
    
      @Test
      fun racingReaders() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SmbWatchHandleImplTest.java

        }
    
        // close() should close underlying handle with 0L when valid
        @Test
        @DisplayName("close() closes underlying handle when valid")
        void close_validHandle_invokesClose() throws Exception {
            when(handle.isValid()).thenReturn(true);
            SmbWatchHandleImpl sut = new SmbWatchHandleImpl(handle, 0, false);
    
            sut.close();
    
            verify(handle, times(1)).close(0L);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/DirFileEntryEnumIteratorBaseTest.java

            assertEquals("one", it.next().getName()); // consume initial
            // Next call should handle CIFSException and close iterator
            assertFalse(it.hasNext()); // After error, hasNext should return false
    
            // Assert
            verify(tree, times(1)).release();
        }
    
        @Test
        @DisplayName("close() closes when there is a next element and releases handle")
        void explicitClose() throws Exception {
            // Arrange
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.5K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/ResponseBody.kt

     * must close this body by calling any of the following methods:
     *
     * * `Response.close()`
     * * `Response.body().close()`
     * * `Response.body().source().close()`
     * * `Response.body().charStream().close()`
     * * `Response.body().byteStream().close()`
     * * `Response.body().bytes()`
     * * `Response.body().string()`
     *
     * There is no benefit to invoking multiple `close()` methods for the same response body.
     *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:51:25 UTC 2025
    - 11.6K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/DirFileEntryEnumIterator1Test.java

            // Close should have sent FindClose2 exactly once
            ArgumentCaptor<SmbComFindClose2> captor = ArgumentCaptor.forClass(SmbComFindClose2.class);
            verify(tree, times(1)).send(captor.capture(), any());
            assertNotNull(captor.getValue());
    
            // Tree handle is released after close
            verify(tree, atLeastOnce()).release();
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/DiskLruCache.kt

          if (civilizedFileSystem) return fileSource
    
          lockingSourceCount++
          return object : ForwardingSource(fileSource) {
            private var closed = false
    
            override fun close() {
              super.close()
              if (!closed) {
                closed = true
                synchronized(this@DiskLruCache) {
                  lockingSourceCount--
                  if (lockingSourceCount == 0 && zombie) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 34.7K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt

      /**
       * Closes the response body. Equivalent to `body().close()`.
       *
       * Prior to OkHttp 5.0, it was an error to close a response that is not eligible for a body. This
       * includes the responses returned from [cacheResponse], [networkResponse], and [priorResponse].
       */
      override fun close() {
        body.close()
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 14:39:28 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/SmbFileHandleImplTest.java

            h.close(777L);
    
            // Verify SMB2 close path
            verify(tree, times(1)).send(isA(Smb2CloseRequest.class), eq(RequestParam.NO_RETRY));
            // Tree is always released in finally
            verify(tree, times(1)).release();
        }
    
        @Test
        @DisplayName("close(long) sends SMB1 close request and releases tree when SMB1")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/NtlmPasswordAuthenticatorTest.java

            assertFalse(auth.isClosed());
    
            // Close the authenticator
            auth.close();
    
            // Verify it's closed
            assertTrue(auth.isClosed());
            // Cannot check password after closing as it now throws IllegalStateException
            // This is actually good security practice - closed authenticators cannot be accessed
    
            // Verify multiple closes don't cause issues
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 23.3K bytes
    - Viewed (0)
Back to top