Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for LineProcessor (0.28 sec)

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

       * @param callback the LineProcessor to use to handle the lines
       * @return the output of processing the lines
       * @throws IOException if an I/O error occurs
       */
      @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 {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/FilesTest.java

        assertTrue(temp.delete());
      }
    
      public void testReadLines_withLineProcessor() throws IOException {
        File temp = createTempFile();
        LineProcessor<List<String>> collect =
            new LineProcessor<List<String>>() {
              final List<String> collector = new ArrayList<>();
    
              @Override
              public boolean processLine(String line) {
                collector.add(line);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/CharStreamsTest.java

      }
    
      public void testReadLines_withLineProcessor() throws IOException {
        String text = "a\nb\nc";
    
        // Test a LineProcessor that always returns false.
        Reader r = new StringReader(text);
        LineProcessor<Integer> alwaysFalse =
            new LineProcessor<Integer>() {
              int seen;
    
              @Override
              public boolean processLine(String line) {
                seen++;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/CharStreamsTest.java

      }
    
      public void testReadLines_withLineProcessor() throws IOException {
        String text = "a\nb\nc";
    
        // Test a LineProcessor that always returns false.
        Reader r = new StringReader(text);
        LineProcessor<Integer> alwaysFalse =
            new LineProcessor<Integer>() {
              int seen;
    
              @Override
              public boolean processLine(String line) {
                seen++;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/CharSourceTest.java

      }
    
      public void testReadLines_withProcessor() throws IOException {
        TestCharSource lines = new TestCharSource(LINES);
        List<String> list =
            lines.readLines(
                new LineProcessor<List<String>>() {
                  final List<String> list = new ArrayList<>();
    
                  @Override
                  public boolean processLine(String line) throws IOException {
                    list.add(line);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/CharSource.java

          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
       * Reads lines of text from this source, processing each line as it is read using the given {@link
       * LineProcessor processor}. Stops when all lines have been processed or the processor returns
       * {@code false} and returns the result produced by the processor.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 25.7K bytes
    - Viewed (0)
  7. guava/src/com/google/common/io/CharSource.java

          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
       * Reads lines of text from this source, processing each line as it is read using the given {@link
       * LineProcessor processor}. Stops when all lines have been processed or the processor returns
       * {@code false} and returns the result produced by the processor.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 25.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/CharSourceTester.java

        }
      }
    
      public void testReadLines_withProcessor() throws IOException {
        List<String> list =
            source.readLines(
                new LineProcessor<List<String>>() {
                  final List<String> list = new ArrayList<>();
    
                  @Override
                  public boolean processLine(String line) throws IOException {
                    list.add(line);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 6.9K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/io/ResourcesTest.java

      }
    
      public void testReadLines_withLineProcessor() throws IOException {
        URL resource = getClass().getResource("testdata/alice_in_wonderland.txt");
        LineProcessor<List<String>> collectAndLowercaseAndTrim =
            new LineProcessor<List<String>>() {
              final List<String> collector = new ArrayList<>();
    
              @Override
              public boolean processLine(String line) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed May 14 19:40:47 UTC 2025
    - 6.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/io/FilesTest.java

        assertTrue(temp.delete());
      }
    
      public void testReadLines_withLineProcessor() throws IOException {
        File temp = createTempFile();
        LineProcessor<List<String>> collect =
            new LineProcessor<List<String>>() {
              final List<String> collector = new ArrayList<>();
    
              @Override
              public boolean processLine(String line) {
                collector.add(line);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 22.1K bytes
    - Viewed (0)
Back to top