Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for readLines (0.21 sec)

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

       */
      @CanIgnoreReturnValue // some processors won't return a useful result
      @ParametricNullness
      public static <T extends @Nullable Object> T readLines(
          URL url, Charset charset, LineProcessor<T> callback) throws IOException {
        return asCharSource(url, charset).readLines(callback);
      }
    
      /**
       * Reads all of the lines from a URL. The lines do not include line-termination characters, but do
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/io/CharStreams.java

       * Files#readLines} and {@link Resources#readLines} methods.
       *
       * @param r the object to read from
       * @return a mutable {@link List} containing all the lines
       * @throws IOException if an I/O error occurs
       */
      public static List<String> readLines(Readable r) throws IOException {
        List<String> result = new ArrayList<>();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/CharSourceTester.java

        } else {
          assertEquals(expectedLines.get(0), source.readFirstLine());
        }
      }
    
      public void testReadLines_toList() throws IOException {
        assertExpectedLines(source.readLines());
      }
    
      public void testIsEmpty() throws IOException {
        assertEquals(expected.isEmpty(), source.isEmpty());
      }
    
      public void testLength() throws IOException {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 6.8K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/CharSource.java

      @ParametricNullness
      public <T extends @Nullable Object> T readLines(LineProcessor<T> processor) throws IOException {
        checkNotNull(processor);
    
        Closer closer = Closer.create();
        try {
          Reader reader = closer.register(openStream());
          return CharStreams.readLines(reader, processor);
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
    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)
  5. guava-tests/test/com/google/common/io/CharStreamsTest.java

      public void testToString() throws IOException {
        assertEquals(TEXT, CharStreams.toString(new StringReader(TEXT)));
      }
    
      public void testReadLines() throws IOException {
        List<String> lines = CharStreams.readLines(new StringReader("a\nb\nc"));
        assertEquals(ImmutableList.of("a", "b", "c"), lines);
      }
    
      public void testReadLines_withLineProcessor() throws IOException {
        String text = "a\nb\nc";
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/CharStreamsTest.java

      public void testToString() throws IOException {
        assertEquals(TEXT, CharStreams.toString(new StringReader(TEXT)));
      }
    
      public void testReadLines() throws IOException {
        List<String> lines = CharStreams.readLines(new StringReader("a\nb\nc"));
        assertEquals(ImmutableList.of("a", "b", "c"), lines);
      }
    
      public void testReadLines_withLineProcessor() throws IOException {
        String text = "a\nb\nc";
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/FilesTest.java

                return collector;
              }
            };
        assertThat(Files.readLines(temp, Charsets.UTF_8, collect)).isEmpty();
    
        PrintWriter w = new PrintWriter(Files.newWriter(temp, Charsets.UTF_8));
        w.println("hello");
        w.println("");
        w.println(" world  ");
        w.println("");
        w.close();
        Files.readLines(temp, Charsets.UTF_8, collect);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/FilesTest.java

                return collector;
              }
            };
        assertThat(Files.readLines(temp, Charsets.UTF_8, collect)).isEmpty();
    
        PrintWriter w = new PrintWriter(Files.newWriter(temp, Charsets.UTF_8));
        w.println("hello");
        w.println("");
        w.println(" world  ");
        w.println("");
        w.close();
        Files.readLines(temp, Charsets.UTF_8, collect);
    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)
  9. guava-tests/test/com/google/common/io/CharSourceTester.java

        } else {
          assertEquals(expectedLines.get(0), source.readFirstLine());
        }
      }
    
      public void testReadLines_toList() throws IOException {
        assertExpectedLines(source.readLines());
      }
    
      public void testIsEmpty() throws IOException {
        assertEquals(expected.isEmpty(), source.isEmpty());
      }
    
      public void testLength() throws IOException {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 7.3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/io/CharSourceTest.java

        assertEquals(ImmutableList.of("foo", "bar", "baz", "something"), lines.readLines());
        assertTrue(lines.wasStreamOpened() && lines.wasStreamClosed());
      }
    
      public void testReadLines_withProcessor() throws IOException {
        TestCharSource lines = new TestCharSource(LINES);
        List<String> list =
            lines.readLines(
                new LineProcessor<List<String>>() {
    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