public static String[] wordWrap(String str,int firstLineSize,int nonFirstLineSize){
  String[] lines=wordWrap(str,firstLineSize);
  if (lines.length > 1 && firstLineSize != nonFirstLineSize) {
    String notFirstLinesString=StringUtils.join(lines," ",1,lines.length);
    String[] nonFirstLines=wordWrap(notFirstLinesString,nonFirstLineSize);
    List<String> nonFirstLineCollection=Arrays.asList(nonFirstLines);
    ArrayList<String> allLines=new ArrayList<String>();
    allLines.add(lines[0]);
    allLines.addAll(nonFirstLineCollection);
    lines=allLines.toArray(lines);
  }
  return lines;
}

public static String [ ] wordWrap ( String str , int firstLineSize , int nonFirstLineSize ) { String [ ] lines = wordWrap ( str , firstLineSize ) ; if ( lines . length > 1 && firstLineSize != nonFirstLineSize ) { String notFirstLinesString = StringUtils . join ( lines , " " , 1 , lines . length ) ; String [ ] nonFirstLines = wordWrap ( notFirstLinesString , nonFirstLineSize ) ; List < String > nonFirstLineCollection = Arrays . asList ( nonFirstLines ) ; ArrayList < String > allLines = new ArrayList < String > ( ) ; allLines . add ( lines [ 0 ] ) ; allLines . addAll ( nonFirstLineCollection ) ; lines = allLines . toArray ( lines ) ; } return lines ; }
word wrap a string where the line size for the first line is different than the lines sizes for the other lines .
