docs: public static List<String> readLinesInList(final InputStream input, final Charset encoding,
  		final boolean trim) throws IOException
  	{
  		// The List where the lines from the File to save.
  		final List<String> output = new ArrayList<>();
  		try (
  			InputStreamReader isr = encoding == null
  				? new InputStreamReader(input)
  				: new InputStreamReader(input, encoding);
  			BufferedReader reader = new BufferedReader(isr);)
  		{
  			// the line.
  			String line = null;
  			// read all lines from the file
  			do
  			{
  				line = reader.readLine();
  				// if null break the loop
  				if (line == null)
  				{
  					break;
  				}
  				if (trim)
  				{
  					line.trim();
  				}
  				// add the line to the list
  				output.add(line);
  			}
  			while (true);
  		}
  		// return the list with all lines from the file.
  		return output;
  	}