Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 99 for IOException (0.2 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. 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)
  4. 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)
  5. 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)
  6. 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)
  7. android/guava-tests/test/com/google/common/base/JoinerTest.java

              throw new IOException();
            }
    
            @Override
            public Appendable append(@Nullable CharSequence csq, int start, int end)
                throws IOException {
              throw new IOException();
            }
    
            @Override
            public Appendable append(char c) throws IOException {
              throw new IOException();
            }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/io/FilesCreateTempDirTest.java

    import static java.nio.file.attribute.PosixFilePermission.OWNER_READ;
    import static java.nio.file.attribute.PosixFilePermission.OWNER_WRITE;
    import static org.junit.Assert.assertThrows;
    
    import java.io.File;
    import java.io.IOException;
    import java.nio.file.attribute.PosixFileAttributeView;
    import java.nio.file.attribute.PosixFileAttributes;
    import junit.framework.TestCase;
    
    /**
     * Unit test for {@link Files#createTempDir}.
     *
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 06 17:11:11 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/EnumHashBiMap.java

      private void writeObject(ObjectOutputStream stream) throws IOException {
        stream.defaultWriteObject();
        stream.writeObject(keyTypeOrObjectUnderJ2cl);
        Serialization.writeMap(this, stream);
      }
    
      @SuppressWarnings("unchecked") // reading field populated by writeObject
      @GwtIncompatible // java.io.ObjectInputStream
      private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Aug 24 01:40:03 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/FilesTest.java

      }
    
      public void testWriteString() throws IOException {
        File temp = createTempFile();
        Files.write(I18N, temp, Charsets.UTF_16LE);
        assertEquals(I18N, Files.toString(temp, Charsets.UTF_16LE));
      }
    
      public void testWriteBytes() throws IOException {
        File temp = createTempFile();
        byte[] data = newPreFilledByteArray(2000);
        Files.write(data, temp);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.2K bytes
    - Viewed (0)
Back to top