public static boolean determinePathStyleFromUri ( final URI baseURI ) { String path = baseURI . getPath ( ) ; if ( path != null && path . startsWith ( "/" ) ) { path = path . substring ( 1 ) ; } // if the path is null or empty, this is not path-style if ( Utility . isNullOrEmpty ( path ) ) { return false ; } // if this contains a port or has a host which is not DNS, this is path-style return pathStylePorts . contains ( baseURI . getPort ( ) ) || ! isHostDnsName ( baseURI ) ; }
Returns a value that indicates whether a specified URI is a path - style URI .