Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 460 for close (0.15 sec)

  1. android/guava/src/com/google/common/io/Closer.java

      @VisibleForTesting
      Closer(Suppressor suppressor) {
        this.suppressor = checkNotNull(suppressor); // checkNotNull to satisfy null tests
      }
    
      /**
       * Registers the given {@code closeable} to be closed when this {@code Closer} is {@linkplain
       * #close closed}.
       *
       * @return the given {@code closeable}
       */
      // close. this word no longer has any meaning to me.
    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)
  2. guava-tests/test/com/google/common/io/CloserTest.java

        Closer closer = new Closer(suppressor);
    
        IOException exception = new IOException();
    
        // c2 is added last, closed first
        TestCloseable c1 = closer.register(TestCloseable.normal());
        TestCloseable c2 = closer.register(TestCloseable.throwsOnClose(exception));
    
        try {
          closer.close();
        } catch (Throwable expected) {
    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)
  3. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

      private static final ByteSource BROKEN_CLOSE_SOURCE =
          new TestByteSource(new byte[10], CLOSE_THROWS);
      private static final ByteSource BROKEN_OPEN_SOURCE =
          new TestByteSource(new byte[10], OPEN_THROWS);
      private static final ByteSource BROKEN_READ_SOURCE =
          new TestByteSource(new byte[10], READ_THROWS);
      private static final ByteSink BROKEN_CLOSE_SINK = new TestByteSink(CLOSE_THROWS);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/CharSourceTest.java

      static final CharSource BROKEN_CLOSE_SOURCE = new TestCharSource("ABC", CLOSE_THROWS);
      static final CharSource BROKEN_OPEN_SOURCE = new TestCharSource("ABC", OPEN_THROWS);
      static final CharSink BROKEN_WRITE_SINK = new TestCharSink(WRITE_THROWS);
      static final CharSink BROKEN_CLOSE_SINK = new TestCharSink(CLOSE_THROWS);
      static final CharSink BROKEN_OPEN_SINK = new TestCharSink(OPEN_THROWS);
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/io/ByteSource.java

        }
    
        Closer closer = Closer.create();
        try {
          InputStream in = closer.register(openStream());
          return countBySkipping(in);
        } catch (IOException e) {
          // skip may not be supported... at any rate, try reading
        } finally {
          closer.close();
        }
    
        closer = Closer.create();
        try {
          InputStream in = closer.register(openStream());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 26.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/CloseablesTest.java

            new TestInputStream(new ByteArrayInputStream(new byte[1]), TestOption.CLOSE_THROWS);
        Closeables.closeQuietly(in);
        assertTrue(in.closed());
      }
    
      public void testCloseQuietly_readerWithEatenException() throws IOException {
        TestReader in = new TestReader(TestOption.CLOSE_THROWS);
        Closeables.closeQuietly(in);
        assertTrue(in.closed());
      }
    
      public void testCloseNull() throws IOException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/CharSource.java

        checkNotNull(sink);
    
        Closer closer = Closer.create();
        try {
          Reader reader = closer.register(openStream());
          Writer writer = closer.register(sink.openStream());
          return CharStreams.copy(reader, writer);
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  8. 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)
  9. guava-tests/test/com/google/common/io/TestOutputStream.java

      public void close() throws IOException {
        closed = true;
        super.close();
        throwIf(CLOSE_THROWS);
      }
    
      private void throwIf(TestOption option) throws IOException {
        throwIf(options.contains(option));
      }
    
      private static void throwIf(boolean condition) throws IOException {
        if (condition) {
          throw new IOException();
        }
      }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.2K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/core/io/CloseableUtilTest.java

            CloseableUtil.close(out);
        }
    
        private static class NotifyOutputStream extends OutputStream {
            private String notify_;
    
            @Override
            public void write(final int arg0) throws IOException {
            }
    
            @Override
            public void close() throws IOException {
                super.close();
                notify_ = "closed";
            }
    
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.2K bytes
    - Viewed (0)
Back to top