Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 208 for IOException (0.84 sec)

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

      public void testMethodsThrowWhenClosed() throws IOException {
        CharSequenceReader reader = new CharSequenceReader("");
        reader.close();
    
        assertThrows(IOException.class, () -> reader.read());
    
        assertThrows(IOException.class, () -> reader.read(new char[10]));
    
        assertThrows(IOException.class, () -> reader.read(new char[10], 0, 10));
    
        assertThrows(IOException.class, () -> reader.read(CharBuffer.allocate(10)));
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/ByteSourceTester.java

                return out;
              }
            });
        assertExpectedBytes(out.toByteArray());
      }
    
      public void testIsEmpty() throws IOException {
        assertEquals(expected.length == 0, source.isEmpty());
      }
    
      public void testSize() throws IOException {
        assertEquals(expected.length, source.size());
      }
    
      public void testSizeIfKnown() throws IOException {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/Closeables.java

       *     methods
       * @throws IOException if {@code swallowIOException} is false and {@code close} throws an {@code
       *     IOException}.
       */
      public static void close(@CheckForNull Closeable closeable, boolean swallowIOException)
          throws IOException {
        if (closeable == null) {
          return;
        }
        try {
          closeable.close();
        } catch (IOException e) {
          if (swallowIOException) {
    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/ByteSinkTest.java

      }
    
      public void testWrite_bytes() throws IOException {
        assertArrayEquals(new byte[0], sink.getBytes());
        sink.write(bytes);
    
        assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed());
        assertArrayEquals(bytes, sink.getBytes());
      }
    
      public void testWriteFrom_inputStream() throws IOException {
        ByteArrayInputStream in = new ByteArrayInputStream(bytes);
        sink.writeFrom(in);
    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/io/TestWriter.java

      }
    
      @Override
      public void write(int c) throws IOException {
        super.write(c);
        flush(); // flush write to TestOutputStream to get its behavior
      }
    
      @Override
      public void write(char[] cbuf, int off, int len) throws IOException {
        super.write(cbuf, off, len);
        flush();
      }
    
      @Override
      public void write(String str, int off, int len) throws IOException {
        super.write(str, off, len);
        flush();
      }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/TestCharSink.java

        return byteSink.wasStreamClosed();
      }
    
      @Override
      public Writer openStream() throws IOException {
        // using TestByteSink's output stream to get option behavior, so flush to it on every write
        return new FilterWriter(new OutputStreamWriter(byteSink.openStream(), UTF_8)) {
          @Override
          public void write(int c) throws IOException {
            super.write(c);
            flush();
          }
    
          @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 21 02:27:51 GMT 2017
    - 2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/LineBufferTest.java

          @Override
          public int read(CharBuffer cbuf) throws IOException {
            return reader.read(cbuf);
          }
        };
      }
    
      private static Reader getChunkedReader(String input, final int chunk) {
        return new FilterReader(new StringReader(input)) {
          @Override
          public int read(char[] cbuf, int off, int len) throws IOException {
            return super.read(cbuf, off, Math.min(chunk, len));
          }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/base/Joiner.java

          @Nullable Object... rest)
          throws IOException {
        return appendTo(appendable, iterable(first, second, rest));
      }
    
      /**
       * Appends the string representation of each of {@code parts}, using the previously configured
       * separator between each, to {@code builder}. Identical to {@link #appendTo(Appendable,
       * Iterable)}, except that it does not throw {@link IOException}.
       */
      @CanIgnoreReturnValue
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 18.6K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

        ByteSource source = out.asByteSource();
    
        if (JAVA_IO_TMPDIR.value().equals("/sdcard")) {
          assertThrows(IOException.class, () -> out.write(data));
          return;
        }
        out.write(data);
        assertTrue(Arrays.equals(data, source.read()));
    
        out.close();
        assertThrows(IOException.class, () -> out.write(42));
    
        // Verify that write had no effect
        assertTrue(Arrays.equals(data, source.read()));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/escape/ArrayBasedCharEscaperTest.java

     */
    
    package com.google.common.escape;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.ImmutableMap;
    import com.google.common.escape.testing.EscaperAsserts;
    import java.io.IOException;
    import junit.framework.TestCase;
    
    /**
     * @author David Beaumont
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public class ArrayBasedCharEscaperTest extends TestCase {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 23:02:38 GMT 2024
    - 3.5K bytes
    - Viewed (0)
Back to top