test_class.file: cosmic-common/src/test/java/com/cloud/utils/UriUtilsTest.java
test_class.identifier: UriUtilsTest
test_case.body: @Test
      public void encodeURIComponent() {
          Assert.assertEquals("http://localhost",
                  UriUtils.encodeURIComponent("http://localhost"));
          Assert.assertEquals("http://localhost/",
                  UriUtils.encodeURIComponent("http://localhost/"));
          Assert.assertEquals("http://localhost/foo/bar",
                  UriUtils.encodeURIComponent("http://localhost/foo/bar"));
      }
test_case.class_method_signature: UriUtilsTest.encodeURIComponent()
test_case.full_signature: @Test public void encodeURIComponent()
test_case.identifier: encodeURIComponent
test_case.invocations: assertEquals encodeURIComponent assertEquals encodeURIComponent assertEquals encodeURIComponent
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void encodeURIComponent()
focal_class.declarator: s_logger = LoggerFactory.getLogger(UriUtils.class.getName())
focal_class.modifier: public static final
focal_class.original_string: public static final Logger s_logger = LoggerFactory.getLogger(UriUtils.class.getName());
focal_class.type: Logger
focal_class.var_name: s_logger
focal_class.file: cosmic-common/src/main/java/com/cloud/utils/UriUtils.java
focal_class.identifier: UriUtils
focal_class.class_method_signature: UriUtils.formNfsUri(final String host, final String path)
focal_class.full_signature: public static String formNfsUri(final String host, final String path)
focal_class.identifier: formNfsUri
focal_class.modifiers: public static
focal_class.parameters: (final String host, final String path)
focal_class.return: String
focal_class.signature: String formNfsUri(final String host, final String path)
focal_class.class_method_signature: UriUtils.formIscsiUri(final String host, final String iqn, final Integer lun)
focal_class.full_signature: public static String formIscsiUri(final String host, final String iqn, final Integer lun)
focal_class.identifier: formIscsiUri
focal_class.modifiers: public static
focal_class.parameters: (final String host, final String iqn, final Integer lun)
focal_class.return: String
focal_class.signature: String formIscsiUri(final String host, final String iqn, final Integer lun)
focal_class.class_method_signature: UriUtils.formFileUri(final String path)
focal_class.full_signature: public static String formFileUri(final String path)
focal_class.identifier: formFileUri
focal_class.modifiers: public static
focal_class.parameters: (final String path)
focal_class.return: String
focal_class.signature: String formFileUri(final String path)
focal_class.class_method_signature: UriUtils.encodeURIComponent(final String url)
focal_class.full_signature: public static String encodeURIComponent(final String url)
focal_class.identifier: encodeURIComponent
focal_class.modifiers: public static
focal_class.parameters: (final String url)
focal_class.return: String
focal_class.signature: String encodeURIComponent(final String url)
focal_class.class_method_signature: UriUtils.getCifsUriParametersProblems(final URI uri)
focal_class.full_signature: public static String getCifsUriParametersProblems(final URI uri)
focal_class.identifier: getCifsUriParametersProblems
focal_class.modifiers: public static
focal_class.parameters: (final URI uri)
focal_class.return: String
focal_class.signature: String getCifsUriParametersProblems(final URI uri)
focal_class.class_method_signature: UriUtils.hostAndPathPresent(final URI uri)
focal_class.full_signature: public static boolean hostAndPathPresent(final URI uri)
focal_class.identifier: hostAndPathPresent
focal_class.modifiers: public static
focal_class.parameters: (final URI uri)
focal_class.return: boolean
focal_class.signature: boolean hostAndPathPresent(final URI uri)
focal_class.class_method_signature: UriUtils.cifsCredentialsPresent(final URI uri)
focal_class.full_signature: public static boolean cifsCredentialsPresent(final URI uri)
focal_class.identifier: cifsCredentialsPresent
focal_class.modifiers: public static
focal_class.parameters: (final URI uri)
focal_class.return: boolean
focal_class.signature: boolean cifsCredentialsPresent(final URI uri)
focal_class.class_method_signature: UriUtils.getUpdateUri(final String url, final boolean encrypt)
focal_class.full_signature: public static String getUpdateUri(final String url, final boolean encrypt)
focal_class.identifier: getUpdateUri
focal_class.modifiers: public static
focal_class.parameters: (final String url, final boolean encrypt)
focal_class.return: String
focal_class.signature: String getUpdateUri(final String url, final boolean encrypt)
focal_class.class_method_signature: UriUtils.getUserDetails(final String query)
focal_class.full_signature: private static List<NameValuePair> getUserDetails(final String query)
focal_class.identifier: getUserDetails
focal_class.modifiers: private static
focal_class.parameters: (final String query)
focal_class.return: List<NameValuePair>
focal_class.signature: List<NameValuePair> getUserDetails(final String query)
focal_class.class_method_signature: UriUtils.getRemoteSize(final String url)
focal_class.full_signature: public static Long getRemoteSize(final String url)
focal_class.identifier: getRemoteSize
focal_class.modifiers: public static
focal_class.parameters: (final String url)
focal_class.return: Long
focal_class.signature: Long getRemoteSize(final String url)
focal_class.class_method_signature: UriUtils.checkUrlExistence(final String url)
focal_class.full_signature: public static void checkUrlExistence(final String url)
focal_class.identifier: checkUrlExistence
focal_class.modifiers: public static
focal_class.parameters: (final String url)
focal_class.return: void
focal_class.signature: void checkUrlExistence(final String url)
focal_class.class_method_signature: UriUtils.getInputStreamFromUrl(final String url, final String user, final String password)
focal_class.full_signature: public static InputStream getInputStreamFromUrl(final String url, final String user, final String password)
focal_class.identifier: getInputStreamFromUrl
focal_class.modifiers: public static
focal_class.parameters: (final String url, final String user, final String password)
focal_class.return: InputStream
focal_class.signature: InputStream getInputStreamFromUrl(final String url, final String user, final String password)
focal_class.class_method_signature: UriUtils.validateUrl(final String url)
focal_class.full_signature: public static Pair<String, Integer> validateUrl(final String url)
focal_class.identifier: validateUrl
focal_class.modifiers: public static
focal_class.parameters: (final String url)
focal_class.return: Pair<String, Integer>
focal_class.signature: Pair<String, Integer> validateUrl(final String url)
focal_class.class_method_signature: UriUtils.validateUrl(final String format, final String url)
focal_class.full_signature: public static Pair<String, Integer> validateUrl(final String format, final String url)
focal_class.identifier: validateUrl
focal_class.modifiers: public static
focal_class.parameters: (final String format, final String url)
focal_class.return: Pair<String, Integer>
focal_class.signature: Pair<String, Integer> validateUrl(final String format, final String url)
focal_class.class_method_signature: UriUtils.checkFormat(final String format, final String uripath)
focal_class.full_signature: private static void checkFormat(final String format, final String uripath)
focal_class.identifier: checkFormat
focal_class.modifiers: private static
focal_class.parameters: (final String format, final String uripath)
focal_class.return: void
focal_class.signature: void checkFormat(final String format, final String uripath)
focal_method.body: public static String encodeURIComponent(final String url) {
          final int schemeTail = url.indexOf("://");
  
          int pathStart = 0;
          if (schemeTail > 0) {
              pathStart = url.indexOf('/', schemeTail + 3);
          } else {
              pathStart = url.indexOf('/');
          }
  
          if (pathStart > 0) {
              final String[] tokens = url.substring(pathStart + 1).split("/");
              final StringBuilder sb = new StringBuilder(url.substring(0, pathStart));
              for (final String token : tokens) {
                  sb.append("/").append(URLEncoder.encode(token));
              }
  
              return sb.toString();
          }
  
          // no need to do URL component encoding
          return url;
      }
focal_method.class_method_signature: UriUtils.encodeURIComponent(final String url)
focal_method.full_signature: public static String encodeURIComponent(final String url)
focal_method.identifier: encodeURIComponent
focal_method.invocations: indexOf indexOf indexOf split substring substring append append encode toString
focal_method.modifiers: public static
focal_method.parameters: (final String url)
focal_method.return: String
focal_method.signature: String encodeURIComponent(final String url)