Reads from the file and returns result as a list of lines.
491815
def readlines(self, encoding=None):
        """"""
        try:
            encoding = encoding or ENCODING
            with codecs.open(self.path, encoding=None) as fi:
                return fi.readlines()
        except:
            return []
834975
def _lines(self):
        

        chunkIndices = self._listChunks()
        for chunkIndex in chunkIndices:
            with self._openChunk(chunkIndex) as chunk:
                yield from chunk._lines()
981431
protected Stream<String> lines() throws IOException {
    InputStream input = readFiles();
    Reader reader = new InputStreamReader(input, UTF_8);
    return new BufferedReader(reader).lines().map(String::trim)
        .onClose(() -> Closeables.closeQuietly(input));
  }
769507
public String[] readLines() throws IOException {

        List<String> list = new ArrayList<String>();
        String line;
        while ((line = readLine()) != null) {
            list.add(line);
        }

        return list.toArray(new String[0]);
    }
195146
def readlines(self, offset=0):
        """"""
        try:
            with open(self._filepath) as fp:
                # For full read go through existing lines in file
                if self._full_read:
                    fp.seek(offset)
                    for row in fp:
                        yield row

                # Okay now dynamically tail the file
                if self._tail:
                    while True:
                        current = fp.tell()
                        row = fp.readline()
                        if row:
                            yield row
                        else:
                            fp.seek(current)
                            time.sleep(self._sleep)

        except IOError as err:
            print('Error reading the file {0}: {1}'.format(self._filepath, err))
            return
429825
private static List<String> readLines(Option option) {
        String optionStr = GsonUtil.format(option);
        InputStream is = null;
        InputStreamReader iReader = null;
        BufferedReader bufferedReader = null;
        List<String> lines = new ArrayList<String>();
        String line;
        try {
            is = OptionUtil.class.getResourceAsStream("/template");
            iReader = new InputStreamReader(is, "UTF-8");
            bufferedReader = new BufferedReader(iReader);
            while ((line = bufferedReader.readLine()) != null) {
                if (line.contains("##option##")) {
                    line = line.replace("##option##", optionStr);
                }
                lines.add(line);
            }
        } catch (Exception e) {
        } finally {
            if (is != null) {
                try {
                    is.close();
                } catch (IOException e) {
                    //ignore
                }
            }
        }
        return lines;
    }
1320372
protected List<String> readFromFile(String filename) {
    Path path = new File(filename).toPath();
    List<String> result = new ArrayList<>();
    try {
      List<String> tempResult = Files.readAllLines(path);
      if (tempResult != null) {
        result.addAll(tempResult);
      }
    } catch (IOException e) {
      LOG.log(Level.SEVERE, "Failed to read from file. ", e);
    }
    return result;
  }
585498
def read_file(filename, alt=None):
    
    lines = None

    try:
        with open(filename, encoding='utf-8') as f:
            lines = f.read()
    except IOError:
        lines = [] if alt is None else alt
    return lines
1284681
private String[] readLine() throws IOException {
        // Read the next number of non zeros.
        String line = reader.readLine();
        if (line == null)
            throw new IllegalArgumentException(
                    "The matrix file is improperly formatted");
        return line.split("\\s+");
    }
1136626
public static List<String> readLines(InputStream input) throws IOException {
        final InputStreamReader reader = new InputStreamReader(input);
        return readLines(reader);
    }
955384
def readlines(self):
        """"""
        if self.grammar:
            tot = []
            # Used this way instead of a 'for' loop against
            # self.file.readlines() so that there wasn't two copies of the file
            # in memory.
            while 1:
                line = self.file.readline()
                if not line:
                    break
                tot.append(line)
            return tot
        return self.file.readlines()
957206
public static List<String> readLines(File file) throws IOException {
        return IOGroovyMethods.readLines(newReader(file));
    }
781530
public static List<String> toLines(final Reader input) throws IOException {
		return CharStreams.readLines(toBufferedReader(input));
	}
739826
def read_lines(in_file):
    """"""

    with open(in_file, 'r') as inf:
        in_contents = inf.read().split('\n')
    return in_contents
1106030
def readlines(self, sizehint = -1):
        
        result = []
        while True:
            line = self.readline()
            if not line: break
            result.append(line)
        return result
657398
public List<String> getLines() {
    try {
      return CharSource.wrap(sourceBuilder).readLines();
    } catch (IOException e) {
      throw new AssertionError("IOException not possible, as the string is in-memory");
    }
  }
944199
public static List<String> readFileToList(final File file, final String encoding)
		throws IOException
	{
		final List<String> fn = new ArrayList<>();
		try (BufferedReader reader = (BufferedReader)StreamExtensions.getReader(file, encoding,
			false))
		{
			// the line.
			String line = null;
			// read all lines from the file
			do
			{

				line = reader.readLine();

				// if null break the loop
				if (line == null)
				{
					break;
				}
				fn.add(line);

			}
			while (true);
		}
		catch (final IOException e)
		{
			throw e;
		}
		return fn;
	}