public static String getFriendlyName(String fileName, boolean excludeLocalFilePrefix) {
    if (fileName == null) {
      return "";
    }
    StringBuilder filePath = new StringBuilder();


    int pos = fileName.lastIndexOf('@');

    if (pos == -1) {
      filePath.append(fileName);
    } else {
      int pos2 = fileName.indexOf(PROTO_PREFIX);

      if (pos2 == -1) {
        filePath.append(fileName);
      } else {
        String protocol = fileName.substring(0, pos2);

        filePath.append(protocol).append(PROTO_PREFIX).append(fileName.substring(pos + 1));
      }
    }

    String returnedString = filePath.toString();

    if (excludeLocalFilePrefix && returnedString.startsWith(FILE_PREFIX)) {
      return filePath.substring(FILE_PREFIX_LEN);
    }

    return returnedString;
  }
Remove user credentials information

@param fileName The file name
@return The "safe" display name without username and password information
olv-vfs/src/main/java/pl/otros/vfs/browser/util/VFSUtils.java