Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 880 for Close (0.15 sec)

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

      @Override
      public void write(int b) throws IOException {
        throwIf(closed);
        throwIf(WRITE_THROWS);
        super.write(b);
      }
    
      @Override
      public void close() throws IOException {
        closed = true;
        super.close();
        throwIf(CLOSE_THROWS);
      }
    
      private void throwIf(TestOption option) throws IOException {
        throwIf(options.contains(option));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.2K bytes
    - Viewed (0)
  2. okhttp/src/test/java/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() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/CloseablesTest.java

    import java.io.Reader;
    import junit.framework.TestCase;
    
    /**
     * Unit tests for {@link Closeables}.
     *
     * <p>Checks proper closing behavior, and ensures that IOExceptions on Closeable.close() are not
     * propagated out from the {@link Closeables#close} method if {@code swallowException} is true.
     *
     * @author Michael Lancaster
     */
    public class CloseablesTest extends TestCase {
      private Closeable mockCloseable;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/io/CloseableUtil.java

         * <p>
         * {@link Closeable#close()}が例外をスローした場合はログにエラーメッセージを出力します。
         * 例外は再スローされません。これは、次のような状況で元の例外が失われるのを防ぐためです。
         * </p>
         *
         * <pre>
         * InputStream is = ...;
         * try {
         *   is.read(...);
         * } finaly {
         *   close(is);
         * }
         * </pre>
         * <p>
         * {@literal try}ブロックで例外が発生した場合、{@literal finally}ブロックの
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial008_an.py

    
    async def dependency_a():
        dep_a = generate_dep_a()
        try:
            yield dep_a
        finally:
            dep_a.close()
    
    
    async def dependency_b(dep_a: Annotated[DepA, Depends(dependency_a)]):
        dep_b = generate_dep_b()
        try:
            yield dep_b
        finally:
            dep_b.close(dep_a)
    
    
    async def dependency_c(dep_b: Annotated[DepB, Depends(dependency_b)]):
        dep_c = generate_dep_c()
        try:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 531 bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/io/TestInputStream.java

        throwIf(closed);
        return options.contains(TestOption.AVAILABLE_ALWAYS_ZERO) ? 0 : in.available();
      }
    
      @Override
      public void close() throws IOException {
        closed = true;
        throwIf(CLOSE_THROWS);
        in.close();
      }
    
      private void throwIf(TestOption option) throws IOException {
        throwIf(options.contains(option));
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/TestInputStream.java

        throwIf(closed);
        return options.contains(TestOption.AVAILABLE_ALWAYS_ZERO) ? 0 : in.available();
      }
    
      @Override
      public void close() throws IOException {
        closed = true;
        throwIf(CLOSE_THROWS);
        in.close();
      }
    
      private void throwIf(TestOption option) throws IOException {
        throwIf(options.contains(option));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.5K bytes
    - Viewed (0)
  8. api/go1.8.txt

    pkg database/sql/driver, type RowsColumnTypeDatabaseTypeName interface { Close, ColumnTypeDatabaseTypeName, Columns, Next }
    pkg database/sql/driver, type RowsColumnTypeDatabaseTypeName interface, Close() error
    pkg database/sql/driver, type RowsColumnTypeDatabaseTypeName interface, Columns() []string
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Dec 21 05:25:57 GMT 2016
    - 16.3K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

     * * `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.
     *
     * For synchronous calls, the easiest way to make sure a response body is closed is with a `try`
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  10. internal/lock/lock_test.go

    	if isClosed {
    		t.Fatal("File ref count shouldn't be zero")
    	}
    
    	// Decrease reference count by 1.
    	if err = rlk.Close(); err != nil {
    		t.Fatal(err)
    	}
    
    	isClosed = rlk.IsClosed()
    	if isClosed {
    		t.Fatal("File ref count shouldn't be zero")
    	}
    
    	// Decrease reference count by 1.
    	if err = rlk.Close(); err != nil {
    		t.Fatal(err)
    	}
    
    	// Now file should be closed.
    	isClosed = rlk.IsClosed()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.6K bytes
    - Viewed (0)
Back to top