code: public static String cleanLeadingAndTrailingNewLineAndChars(String input) {
  
  		if (!StringUtils.hasText(input)) {
  			return input;
  		}
  		String output = input;
  		output = output.replaceAll("[\\s]+\\*[\\s]+", " ");
  		while (output.startsWith("/") || output.startsWith("\n") || output.startsWith("*") || output.startsWith("-")
  				|| output.startsWith("\t") || output.startsWith(" ") || output.startsWith("\\")) {
  			output = output.substring(1);
  		}
  
  		while (output.endsWith("/") || output.endsWith("\n") || output.endsWith(" ") || output.endsWith(",") || output.endsWith("\t")
  				|| output.endsWith("-") || output.endsWith("*")) {
  			output = output.substring(0, output.length() - 1);
  		}
  		return output;
  	}
docs: Utility method to clean New Line,Spaces and other highly useless
  characters found (mainly in javadoc)
  
  @param input
  The string to be cleaned
  @return Cleaned String