Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 31 for readLines (0.18 sec)

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

        try {
          return new CharSource() {
            @Override
            public Reader openStream() throws IOException {
              return new StringReader(string);
            }
          }.readLines();
        } catch (IOException e) {
          throw new AssertionError();
        }
      }
    
      @Override
      public void tearDown() throws IOException {
        factory.tearDown();
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 27 18:57:08 GMT 2022
    - 4.9K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/io/Files.java

       * @throws IOException if an I/O error occurs
       */
      public static List<String> readLines(File file, Charset charset) throws IOException {
        // don't use asCharSource(file, charset).readLines() because that returns
        // an immutable list, which would change the behavior of this method
        return asCharSource(file, charset)
            .readLines(
                new LineProcessor<List<String>>() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/ResourcesTest.java

      }
    
      public void testReadLines() throws IOException {
        // TODO(chrisn): Check in a better resource
        URL resource = getClass().getResource("testdata/i18n.txt");
        assertEquals(ImmutableList.of(I18N), Resources.readLines(resource, Charsets.UTF_8));
      }
    
      public void testReadLines_withLineProcessor() throws IOException {
        URL resource = getClass().getResource("testdata/alice_in_wonderland.txt");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/ResourcesTest.java

      }
    
      public void testReadLines() throws IOException {
        // TODO(chrisn): Check in a better resource
        URL resource = getClass().getResource("testdata/i18n.txt");
        assertEquals(ImmutableList.of(I18N), Resources.readLines(resource, Charsets.UTF_8));
      }
    
      public void testReadLines_withLineProcessor() throws IOException {
        URL resource = getClass().getResource("testdata/alice_in_wonderland.txt");
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/io/LineProcessor.java

    import com.google.errorprone.annotations.CanIgnoreReturnValue;
    import java.io.IOException;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * A callback to be used with the streaming {@code readLines} methods.
     *
     * <p>{@link #processLine} will be called for each line that is read, and should return {@code
     * false} when you want to stop processing.
     *
     * @author Miles Barr
     * @since 1.0
     */
    @J2ktIncompatible
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/SourceSinkTester.java

        try {
          return new CharSource() {
            @Override
            public Reader openStream() throws IOException {
              return new StringReader(string);
            }
          }.readLines();
        } catch (IOException e) {
          throw new AssertionError();
        }
      }
    
      @Override
      public void tearDown() throws IOException {
        factory.tearDown();
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 27 18:57:08 GMT 2022
    - 4.9K bytes
    - Viewed (0)
  7. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/io/FilesSimplifyPathTest.java

      private void doExtensiveTest(String resourceName) throws IOException {
        Splitter splitter = Splitter.on(CharMatcher.whitespace());
        URL url = getClass().getResource(resourceName);
        for (String line : Resources.readLines(url, UTF_8)) {
          Iterator<String> iterator = splitter.split(line).iterator();
          String input = iterator.next();
          String expectedOutput = iterator.next();
          assertFalse(iterator.hasNext());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jul 19 14:00:24 GMT 2016
    - 11K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/io/FilesSimplifyPathTest.java

      private void doExtensiveTest(String resourceName) throws IOException {
        Splitter splitter = Splitter.on(CharMatcher.whitespace());
        URL url = getClass().getResource(resourceName);
        for (String line : Resources.readLines(url, UTF_8)) {
          Iterator<String> iterator = splitter.split(line).iterator();
          String input = iterator.next();
          String expectedOutput = iterator.next();
          assertFalse(iterator.hasNext());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 21 02:27:51 GMT 2017
    - 11K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/LineBufferTest.java

        BufferedReader r = new BufferedReader(getChunkedReader(input, chunk));
        List<String> lines = Lists.newArrayList();
        String line;
        while ((line = r.readLine()) != null) {
          lines.add(line);
        }
        r.close();
        return lines;
      }
    
      private static List<String> readUsingReader(String input, int chunk, boolean asReader)
          throws IOException {
    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)
Back to top