private static String stripNonPrintableCharacters(String input){
  return input.replaceAll("[\\x00-\\x1F]","");
}

private static String stripNonPrintableCharacters ( String input ) { return input . replaceAll ( "[\\x00-\\x1F]" , "" ) ; }
removes unprintable chartacters from input string
