/** * Returns an Iterable of the lines in the file, wrapping the generated * FileInputStream with an instance of the supplied class. IO errors will * throw an (unchecked) RuntimeIOException * * @param file The file whose lines are to be read. * @param fileInputStreamWrapper * The class to wrap the InputStream with, e.g. GZIPInputStream. Note * that the class must have a constructor that accepts an * InputStream. * @param encoding The encoding to use when reading lines. * @return An Iterable containing the lines from the file. */ public static Iterable<String> readLines(final File file, final Class<? extends InputStream> fileInputStreamWrapper, final String encoding) { return new GetLinesIterable(file, fileInputStreamWrapper, encoding); }
/** * Returns an Iterable of the lines in the file, wrapping the generated * FileInputStream with an instance of the supplied class. IO errors will * throw an (unchecked) RuntimeIOException * * @param file The file whose lines are to be read. * @param fileInputStreamWrapper * The class to wrap the InputStream with, e.g. GZIPInputStream. Note * that the class must have a constructor that accepts an * InputStream. * @param encoding The encoding to use when reading lines. * @return An Iterable containing the lines from the file. */ public static Iterable<String> readLines(final File file, final Class<? extends InputStream> fileInputStreamWrapper, final String encoding) { return new GetLinesIterable(file, fileInputStreamWrapper, encoding); }
/** * Returns an Iterable of the lines in the file, wrapping the generated * FileInputStream with an instance of the supplied class. IO errors will * throw an (unchecked) RuntimeIOException * * @param file The file whose lines are to be read. * @param fileInputStreamWrapper * The class to wrap the InputStream with, e.g. GZIPInputStream. Note * that the class must have a constructor that accepts an * InputStream. * @param encoding The encoding to use when reading lines. * @return An Iterable containing the lines from the file. */ public static Iterable<String> readLines(final File file, final Class<? extends InputStream> fileInputStreamWrapper, final String encoding) { return new GetLinesIterable(file, fileInputStreamWrapper, encoding); }
/** * Returns an Iterable of the lines in the file. * * The file reader will be closed when the iterator is exhausted. IO errors * will throw an (unchecked) RuntimeIOException * * @param path The file whose lines are to be read. * @param encoding The encoding to use when reading lines. * @return An Iterable containing the lines from the file. */ public static Iterable<String> readLines(String path, String encoding) { return new GetLinesIterable(path, null, encoding); }
/** * Returns an Iterable of the lines in the file. * * The file reader will be closed when the iterator is exhausted. IO errors * will throw an (unchecked) RuntimeIOException * * @param path The file whose lines are to be read. * @param encoding The encoding to use when reading lines. * @return An Iterable containing the lines from the file. */ public static Iterable<String> readLines(String path, String encoding) { return new GetLinesIterable(path, null, encoding); }
/** * Returns an Iterable of the lines in the file. * * The file reader will be closed when the iterator is exhausted. IO errors * will throw an (unchecked) RuntimeIOException * * @param path The file whose lines are to be read. * @param encoding The encoding to use when reading lines. * @return An Iterable containing the lines from the file. */ public static Iterable<String> readLines(String path, String encoding) { return new GetLinesIterable(path, null, encoding); }
/** * Returns an Iterable of the lines in the file, wrapping the generated * FileInputStream with an instance of the supplied class. IO errors will * throw an (unchecked) RuntimeIOException * * @param file The file whose lines are to be read. * @param fileInputStreamWrapper * The class to wrap the InputStream with, e.g. GZIPInputStream. Note * that the class must have a constructor that accepts an * InputStream. * @param encoding The encoding to use when reading lines. * @return An Iterable containing the lines from the file. */ public static Iterable<String> readLines(final File file, final Class<? extends InputStream> fileInputStreamWrapper, final String encoding) { return new GetLinesIterable(file, fileInputStreamWrapper, encoding); }
/** * Returns an Iterable of the lines in the file. * * The file reader will be closed when the iterator is exhausted. IO errors * will throw an (unchecked) RuntimeIOException * * @param path The file whose lines are to be read. * @param encoding The encoding to use when reading lines. * @return An Iterable containing the lines from the file. */ public static Iterable<String> readLines(String path, String encoding) { return new GetLinesIterable(path, null, encoding); }