Here you can find the source of convertTextToStringList(String text)
public static List<String> convertTextToStringList(String text)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; import java.util.List; public class Main { public static List<String> convertTextToStringList(String text) { List<String> list = null; if (text != null) { text = text.replace("\r\n", "\n"); text = text.replace("\n\r", "\n"); text = text.replace("\r", "\n"); String[] split = text.split("\n"); list = Arrays.asList(split); }//from ww w . j ava 2 s . c om return list; } }