Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 108 for Closeable (0.21 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

      final ExecutorService closingExecutor = newSingleThreadExecutor();
    
      final TestCloseable closeable1 = new TestCloseable("closeable1");
      final TestCloseable closeable2 = new TestCloseable("closeable2");
      final TestCloseable closeable3 = new TestCloseable("closeable3");
      final TestCloseable closeable4 = new TestCloseable("closeable4");
    
      final Waiter waiter = new Waiter();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 74.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

      final ExecutorService closingExecutor = newSingleThreadExecutor();
    
      final TestCloseable closeable1 = new TestCloseable("closeable1");
      final TestCloseable closeable2 = new TestCloseable("closeable2");
      final TestCloseable closeable3 = new TestCloseable("closeable3");
      final TestCloseable closeable4 = new TestCloseable("closeable4");
    
      final Waiter waiter = new Waiter();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/Closeables.java

       *     IOException}.
       */
      public static void close(@CheckForNull Closeable closeable, boolean swallowIOException)
          throws IOException {
        if (closeable == null) {
          return;
        }
        try {
          closeable.close();
        } catch (IOException e) {
          if (swallowIOException) {
            logger.log(Level.WARNING, "IOException thrown while closing Closeable.", e);
          } else {
            throw e;
          }
        }
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/CloserTest.java

          this.closeable = closeable;
          this.thrown = thrown;
          this.suppressed = suppressed;
        }
    
        @Override
        public boolean equals(@Nullable Object obj) {
          if (obj instanceof Suppression) {
            Suppression other = (Suppression) obj;
            return closeable.equals(other.closeable)
                && thrown.equals(other.thrown)
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/CloseablesTest.java

        }
      }
    
      private void doClose(Closeable closeable, boolean swallowException) throws IOException {
        doClose(closeable, swallowException, !swallowException);
      }
    
      // Close the closeable using the Closeables, passing in the swallowException
      // parameter. expectThrown determines whether we expect an exception to
      // be thrown by Closeables.close;
      private void doClose(Closeable closeable, boolean swallowException, boolean expectThrown)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToFutureTest.java

                  @Override
                  public Closeable call(DeferredCloser closer) throws Exception {
                    return closer.eventuallyClose(mockCloseable, executor);
                  }
                },
                executor);
        FluentFuture<Closeable> unused = closingFuture.finishToFuture();
        assertThrows(
            IllegalStateException.class,
            () -> {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/CloserTest.java

          this.closeable = closeable;
          this.thrown = thrown;
          this.suppressed = suppressed;
        }
    
        @Override
        public boolean equals(@Nullable Object obj) {
          if (obj instanceof Suppression) {
            Suppression other = (Suppression) obj;
            return closeable.equals(other.closeable)
                && thrown.equals(other.thrown)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/Closer.java

       * @return the given {@code closeable}
       */
      // close. this word no longer has any meaning to me.
      @CanIgnoreReturnValue
      @ParametricNullness
      public <C extends @Nullable Closeable> C register(@ParametricNullness C closeable) {
        if (closeable != null) {
          stack.addFirst(closeable);
        }
    
        return closeable;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/io/CloseablesTest.java

        }
      }
    
      private void doClose(Closeable closeable, boolean swallowException) throws IOException {
        doClose(closeable, swallowException, !swallowException);
      }
    
      // Close the closeable using the Closeables, passing in the swallowException
      // parameter. expectThrown determines whether we expect an exception to
      // be thrown by Closeables.close;
      private void doClose(Closeable closeable, boolean swallowException, boolean expectThrown)
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/io/CloseableUtil.java

         * {@link #close(Closeable)}でも 例外が発生する可能性があります。その場合に{@literal finally}
         * ブロックから例外をスローすると、 {@literal try}ブロックで発生した元の例外が失われてしまいます。
         * </p>
         *
         * @param closeable
         *            クローズ可能なオブジェクト
         * @see Closeable#close()
         */
        public static void close(final Closeable closeable) {
            if (closeable == null) {
                return;
            }
            try {
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.5K bytes
    - Viewed (0)
Back to top