Java Utililty Methods InputStream to Text Line

List of utility methods to do InputStream to Text Line

Description

The list of methods to do InputStream to Text Line are organized into topic(s).

Method

ArrayListtoLines(InputStream is)
to Lines
ArrayList<String> lines = new ArrayList<String>();
Scanner in = new Scanner(is);
while (in.hasNextLine()) {
    String line = in.nextLine().trim();
    if (line.length() > 0)
        lines.add(line);
return lines;
...
ListtoLines(InputStream is)
Returns a list of Strings that represent lines in the fiven InputStream is .
final ArrayList<String> lines = new ArrayList<String>();
InputStreamReader reader = new InputStreamReader(is);
BufferedReader br = new BufferedReader(reader);
String line;
while (null != (line = br.readLine())) {
    lines.add(line);
return lines;
...