@Override public PathImpl lookupImpl(String userPath,Map<String,Object> newAttributes,boolean isAllowRoot){
  String newPath;
  if (userPath == null)   return _root.fsWalk(getPath(),newAttributes,"/");
  int length=userPath.length();
  int colon=userPath.indexOf(':');
  int slash=userPath.indexOf('/');
  int query=userPath.indexOf('?');
  if (colon != -1 && (colon < slash || slash == -1))   return super.lookupImpl(userPath,newAttributes,isAllowRoot);
  if (slash == 0 && length > 1 && userPath.charAt(1) == '/')   return schemeWalk(userPath,newAttributes,userPath,0);
 else   if (slash == 0) {
    String queryString="";
    if (query >= 0) {
      queryString=userPath.substring(query);
      userPath=userPath.substring(0,query);
    }
    newPath=normalizePath("/",userPath,0,'/');
    if (query >= 0)     newPath+=queryString;
  }
 else {
    String queryString="";
    if (query >= 0) {
      queryString=userPath.substring(query);
      userPath=userPath.substring(0,query);
    }
    newPath=normalizePath(_pathname,userPath,0,'/');
    if (query >= 0)     newPath+=queryString;
  }
  return _root.fsWalk(userPath,newAttributes,newPath);
}

@ Override public PathImpl lookupImpl ( String userPath , Map < String , Object > newAttributes , boolean isAllowRoot ) { String newPath ; if ( userPath == null ) return _root . fsWalk ( getPath ( ) , newAttributes , "/" ) ; int length = userPath . length ( ) ; int colon = userPath . indexOf ( ':' ) ; int slash = userPath . indexOf ( '/' ) ; int query = userPath . indexOf ( '?' ) ; if ( colon != - 1 && ( colon < slash || slash == - 1 ) ) return super . lookupImpl ( userPath , newAttributes , isAllowRoot ) ; if ( slash == 0 && length > 1 && userPath . charAt ( 1 ) == '/' ) return schemeWalk ( userPath , newAttributes , userPath , 0 ) ; else if ( slash == 0 ) { String queryString = "" ; if ( query >= 0 ) { queryString = userPath . substring ( query ) ; userPath = userPath . substring ( 0 , query ) ; } newPath = normalizePath ( "/" , userPath , 0 , '/' ) ; if ( query >= 0 ) newPath += queryString ; } else { String queryString = "" ; if ( query >= 0 ) { queryString = userPath . substring ( query ) ; userPath = userPath . substring ( 0 , query ) ; } newPath = normalizePath ( _pathname , userPath , 0 , '/' ) ; if ( query >= 0 ) newPath += queryString ; } return _root . fsWalk ( userPath , newAttributes , newPath ) ; }
overrides the default lookup to parse the host and port before parsing the path .
