Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 294 for Close (0.33 sec)

  1. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/CloserTest.java

        TestCloseable c3 = closer.register(TestCloseable.normal());
    
        assertFalse(c1.isClosed());
        assertFalse(c2.isClosed());
        assertFalse(c3.isClosed());
    
        closer.close();
    
        assertTrue(c1.isClosed());
        assertTrue(c2.isClosed());
        assertTrue(c3.isClosed());
    
        assertTrue(suppressor.suppressions.isEmpty());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/CountingOutputStream.java

        out.write(b);
        count++;
      }
    
      // Overriding close() because FilterOutputStream's close() method pre-JDK8 has bad behavior:
      // it silently ignores any exception thrown by flush(). Instead, just close the delegate stream.
      // It should flush itself if necessary.
      @Override
      public void close() throws IOException {
        out.close();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/AppendableWriterTest.java

        assertTrue(spy.flushed);
        assertFalse(spy.closed);
    
        writer.close();
        assertTrue(spy.flushed);
        assertTrue(spy.closed);
      }
    
      public void testCloseIsFinal() throws IOException {
        StringBuilder builder = new StringBuilder();
        Writer writer = new AppendableWriter(builder);
    
        writer.write("Hi");
        writer.close();
    
        assertThrows(IOException.class, () -> writer.write(" Greg"));
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  5. 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)
  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. 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)
  9. src/main/java/jcifs/smb/FileEntryAdapterIterator.java

            return n;
        }
    
    
        /**
         * {@inheritDoc}
         * 
         * @throws CIFSException
         *
         * @see java.lang.AutoCloseable#close()
         */
        @Override
        public void close () throws CIFSException {
            this.delegate.close();
        }
    
        @Override
        public void remove() {
            this.delegate.remove();
        }
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 3.5K bytes
    - Viewed (0)
  10. 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)
Back to top