Here you can find the source of unixLineEndings(String text)
public static String unixLineEndings(String text)
//package com.java2s; //License from project: Apache License public class Main { public static String unixLineEndings(String text) { return text.replaceAll("\r\n?", "\n"); }//from www .jav a 2 s .com }