public static List<String> readLines(InputStream in, Charset cs) throws IOException {
		List<String> result = new ArrayList<String>();
		cs = cs != null ? cs : Charset.defaultCharset();
		BufferedReader lineReader = new BufferedReader(new InputStreamReader(in, cs));
		try {
			for (String line; ((line = lineReader.readLine()) != null); ) {
				result.add(line);
			}
		} finally {
			lineReader.close();
		}
		return result;
	}