Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 233 for Closed (0.15 sec)

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

        throwIf(OPEN_THROWS);
      }
    
      public boolean closed() {
        return closed;
      }
    
      @Override
      public void write(byte[] b, int off, int len) throws IOException {
        throwIf(closed);
        throwIf(WRITE_THROWS);
        super.write(b, off, len);
      }
    
      @Override
      public void write(int b) throws IOException {
        throwIf(closed);
        throwIf(WRITE_THROWS);
        super.write(b);
      }
    
    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)
  2. android/guava/src/com/google/common/io/ByteSink.java

        checkNotNull(bytes);
    
        Closer closer = Closer.create();
        try {
          OutputStream out = closer.register(openStream());
          out.write(bytes);
          out.flush(); // https://code.google.com/p/guava-libraries/issues/detail?id=1330
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/ByteSinkTest.java

        TestInputStream in = new TestInputStream(new ByteArrayInputStream(new byte[10]));
        assertFalse(in.closed());
        sink.writeFrom(in);
        assertFalse(in.closed());
      }
    
      public void testClosesOnErrors_copyingFromByteSourceThatThrows() {
        for (TestOption option : EnumSet.of(OPEN_THROWS, READ_THROWS, CLOSE_THROWS)) {
          TestByteSource failSource = new TestByteSource(new byte[10], option);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/ByteSinkTest.java

        TestInputStream in = new TestInputStream(new ByteArrayInputStream(new byte[10]));
        assertFalse(in.closed());
        sink.writeFrom(in);
        assertFalse(in.closed());
      }
    
      public void testClosesOnErrors_copyingFromByteSourceThatThrows() {
        for (TestOption option : EnumSet.of(OPEN_THROWS, READ_THROWS, CLOSE_THROWS)) {
          TestByteSource failSource = new TestByteSource(new byte[10], option);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/GeneralRangeTest.java

        assertEquals(
            GeneralRange.range(ORDERING, 3, CLOSED, 4, OPEN),
            range.intersect(GeneralRange.range(ORDERING, 3, CLOSED, 4, CLOSED)));
      }
    
      public void testIntersectOverlappingRange() {
        GeneralRange<Integer> range = GeneralRange.range(ORDERING, 2, OPEN, 4, CLOSED);
        assertEquals(
            GeneralRange.range(ORDERING, 3, CLOSED, 4, CLOSED),
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/BoundType.java

     * ("open"). If a range is unbounded on a side, it is neither open nor closed on that side; the
     * bound simply does not exist.
     *
     * @since 10.0
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public enum BoundType {
      /** The endpoint value <i>is not</i> considered part of the set ("exclusive"). */
      OPEN(false),
      CLOSED(true);
    
      final boolean inclusive;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Sep 20 15:57:47 GMT 2021
    - 1.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/AppendableWriterTest.java

        Writer writer = new AppendableWriter(spy);
    
        writer.write("Hello");
        assertFalse(spy.flushed);
        assertFalse(spy.closed);
    
        writer.flush();
        assertTrue(spy.flushed);
        assertFalse(spy.closed);
    
        writer.close();
        assertTrue(spy.flushed);
        assertTrue(spy.closed);
      }
    
      public void testCloseIsFinal() throws IOException {
        StringBuilder builder = new StringBuilder();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/SortedMultisets.java

          return multiset().subMultiset(fromElement, CLOSED, toElement, OPEN).elementSet();
        }
    
        @Override
        public SortedSet<E> headSet(@ParametricNullness E toElement) {
          return multiset().headMultiset(toElement, OPEN).elementSet();
        }
    
        @Override
        public SortedSet<E> tailSet(@ParametricNullness E fromElement) {
          return multiset().tailMultiset(fromElement, CLOSED).elementSet();
        }
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 5.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/Closeables.java

       *
       * @param inputStream the input stream to be closed, or {@code null} in which case this method
       *     does nothing
       * @since 17.0
       */
      public static void closeQuietly(@CheckForNull InputStream inputStream) {
        try {
          close(inputStream, true);
        } catch (IOException impossible) {
          throw new AssertionError(impossible);
        }
      }
    
      /**
    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)
  10. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
Back to top