code: protected boolean isValidPath(String path) {
          if (path == null) {
              return false;
          }
          
          if (!PATH_PATTERN.matcher(path).matches()) {
              return false;
          }
          
          try {
              URI uri = new URI(null,null,path,null);
              String norm = uri.normalize().getPath();
              if (norm.startsWith("/../") // Trying to go via the parent dir 
                      || norm.equals("/..")) {   // Trying to go to the parent dir
                  return false;
              }
          } catch (URISyntaxException e) {
              return false;
          }
          
          int slash2Count = countToken("//", path);
          if (isOff(ALLOW_2_SLASHES) && (slash2Count > 0)) {
              return false;
          }
          
          return true;
      }
docs: Returns true if the path is valid.  A <code>null</code> value is considered invalid.
  @param path Path value to validate.
  @return true if path is valid.