private static String unescapeQuotesAndBackSlash(String path, boolean isSingleQuoteUnescape) {
    path = (isSingleQuoteUnescape)? path.replace("\\\"", "\"").replace("\\\\\'", "'")
        : path.replace("\\\\\"", "\"").replace("\\\'", "'");
    return path.replace("\\\\", "\\");
  }
private static String unescapeQuotesAndBackSlash ( String path , boolean isSingleQuoteUnescape ) { path = ( isSingleQuoteUnescape ) ? path . replace ( "\\\"" , "\"" ) . replace ( "\\\\\'" , "'" ) : path . replace ( "\\\\\"" , "\"" ) . replace ( "\\\'" , "'" ) ; return path . replace ( "\\\\" , "\\" ) ; }
This method un escapes backslash, double quotes and single quotes (keeping replacement of \\\\\' to '
as is so as to maintain backward compatibility any serialization/deserialization)