code: public static String replaceCrLfTab(final String str) {
          if (str == null) {
              return null;
          }
          final int len = str.length();
          final StringBuilder sb = new StringBuilder();
          int i = 0;
          while (i < len) {
              final char ch = str.charAt(i++);
              if (ch == '\\') {
                  if (i < len) {
                      final char next = str.charAt(i);
                      final Character replacement = SPECIAL_CHAR_REPLACEMENT_MAP.get(next);
                      if (replacement != null) {
                          sb.append(replacement);
                          i++;
                      } else {
                          sb.append(ch);
                      }
                  } else {
                      sb.append(ch);
                  }
              } else {
                  sb.append(ch);
              }
          }
          return sb.toString();
      }
docs: Replaces the strings "\r", "\n" and "\t" with "carriage return", "new line" and "tab" character.
  
  @param str
  String to replace or <code>null</code>.
  
  @return Replaced string or <code>null</code>.