String (String fullPath) { if (fullPath.startsWith(SSH_PREFIX)) { fullPath = fullPath.substring(SSH_PREFIX.length()); int index = fullPath.indexOf(":"); if (index != -1) { fullPath = fullPath.substring(index + 1); // it is like 8080/home/user or 8080C:\Windows index = 0; while (index < fullPath.length() && Character.isDigit(fullPath.charAt(index))) { index++; } if (index < fullPath.length()) { return fullPath.substring(index); } } } return fullPath; }