Codota Logo
UrlUtils.canonicalizePath
Code IndexAdd Codota to your IDE (free)

How to use
canonicalizePath
method
in
libcore.net.url.UrlUtils

Best Java code snippets using libcore.net.url.UrlUtils.canonicalizePath (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: robovm/robovm

/**
 * Returns a new path by resolving {@code path} relative to {@code base}.
 */
private static String relativePath(String base, String path) {
  if (path.startsWith("/")) {
    return UrlUtils.canonicalizePath(path, true);
  } else if (base != null) {
    String combined = base.substring(0, base.lastIndexOf('/') + 1) + path;
    return UrlUtils.canonicalizePath(combined, true);
  } else {
    return path;
  }
}
origin: robovm/robovm

/**
 * Returns the normalized path.
 */
private String normalize(String path, boolean discardRelativePrefix) {
  path = UrlUtils.canonicalizePath(path, discardRelativePrefix);
  /*
   * If the path contains a colon before the first colon, prepend
   * "./" to differentiate the path from a scheme prefix.
   */
  int colon = path.indexOf(':');
  if (colon != -1) {
    int slash = path.indexOf('/');
    if (slash == -1 || colon < slash) {
      path = "./" + path;
    }
  }
  return path;
}
origin: robovm/robovm

int idx = file.indexOf('!');
String tmpFile = file.substring(idx + 1, file.lastIndexOf('/') + 1) + spec;
tmpFile = UrlUtils.canonicalizePath(tmpFile, true);
file = file.substring(0, idx + 1) + tmpFile;
origin: ibinti/bugvm

/**
 * Returns a new path by resolving {@code path} relative to {@code base}.
 */
private static String relativePath(String base, String path) {
  if (path.startsWith("/")) {
    return UrlUtils.canonicalizePath(path, true);
  } else if (base != null) {
    String combined = base.substring(0, base.lastIndexOf('/') + 1) + path;
    return UrlUtils.canonicalizePath(combined, true);
  } else {
    return path;
  }
}
origin: MobiVM/robovm

/**
 * Returns a new path by resolving {@code path} relative to {@code base}.
 */
private static String relativePath(String base, String path) {
  if (path.startsWith("/")) {
    return UrlUtils.canonicalizePath(path, true);
  } else if (base != null) {
    String combined = base.substring(0, base.lastIndexOf('/') + 1) + path;
    return UrlUtils.canonicalizePath(combined, true);
  } else {
    return path;
  }
}
origin: FlexoVM/flexovm

/**
 * Returns a new path by resolving {@code path} relative to {@code base}.
 */
private static String relativePath(String base, String path) {
  if (path.startsWith("/")) {
    return UrlUtils.canonicalizePath(path, true);
  } else if (base != null) {
    String combined = base.substring(0, base.lastIndexOf('/') + 1) + path;
    return UrlUtils.canonicalizePath(combined, true);
  } else {
    return path;
  }
}
origin: com.gluonhq/robovm-rt

/**
 * Returns a new path by resolving {@code path} relative to {@code base}.
 */
private static String relativePath(String base, String path) {
  if (path.startsWith("/")) {
    return UrlUtils.canonicalizePath(path, true);
  } else if (base != null) {
    String combined = base.substring(0, base.lastIndexOf('/') + 1) + path;
    return UrlUtils.canonicalizePath(combined, true);
  } else {
    return path;
  }
}
origin: com.bugvm/bugvm-rt

/**
 * Returns a new path by resolving {@code path} relative to {@code base}.
 */
private static String relativePath(String base, String path) {
  if (path.startsWith("/")) {
    return UrlUtils.canonicalizePath(path, true);
  } else if (base != null) {
    String combined = base.substring(0, base.lastIndexOf('/') + 1) + path;
    return UrlUtils.canonicalizePath(combined, true);
  } else {
    return path;
  }
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns a new path by resolving {@code path} relative to {@code base}.
 */
private static String relativePath(String base, String path) {
  if (path.startsWith("/")) {
    return UrlUtils.canonicalizePath(path, true);
  } else if (base != null) {
    String combined = base.substring(0, base.lastIndexOf('/') + 1) + path;
    return UrlUtils.canonicalizePath(combined, true);
  } else {
    return path;
  }
}
origin: ibinti/bugvm

/**
 * Returns the normalized path.
 */
private String normalize(String path, boolean discardRelativePrefix) {
  path = UrlUtils.canonicalizePath(path, discardRelativePrefix);
  /*
   * If the path contains a colon before the first colon, prepend
   * "./" to differentiate the path from a scheme prefix.
   */
  int colon = path.indexOf(':');
  if (colon != -1) {
    int slash = path.indexOf('/');
    if (slash == -1 || colon < slash) {
      path = "./" + path;
    }
  }
  return path;
}
origin: MobiVM/robovm

/**
 * Returns the normalized path.
 */
private String normalize(String path, boolean discardRelativePrefix) {
  path = UrlUtils.canonicalizePath(path, discardRelativePrefix);
  /*
   * If the path contains a colon before the first colon, prepend
   * "./" to differentiate the path from a scheme prefix.
   */
  int colon = path.indexOf(':');
  if (colon != -1) {
    int slash = path.indexOf('/');
    if (slash == -1 || colon < slash) {
      path = "./" + path;
    }
  }
  return path;
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns the normalized path.
 */
private String normalize(String path, boolean discardRelativePrefix) {
  path = UrlUtils.canonicalizePath(path, discardRelativePrefix);
  /*
   * If the path contains a colon before the first colon, prepend
   * "./" to differentiate the path from a scheme prefix.
   */
  int colon = path.indexOf(':');
  if (colon != -1) {
    int slash = path.indexOf('/');
    if (slash == -1 || colon < slash) {
      path = "./" + path;
    }
  }
  return path;
}
origin: com.gluonhq/robovm-rt

/**
 * Returns the normalized path.
 */
private String normalize(String path, boolean discardRelativePrefix) {
  path = UrlUtils.canonicalizePath(path, discardRelativePrefix);
  /*
   * If the path contains a colon before the first colon, prepend
   * "./" to differentiate the path from a scheme prefix.
   */
  int colon = path.indexOf(':');
  if (colon != -1) {
    int slash = path.indexOf('/');
    if (slash == -1 || colon < slash) {
      path = "./" + path;
    }
  }
  return path;
}
origin: com.bugvm/bugvm-rt

/**
 * Returns the normalized path.
 */
private String normalize(String path, boolean discardRelativePrefix) {
  path = UrlUtils.canonicalizePath(path, discardRelativePrefix);
  /*
   * If the path contains a colon before the first colon, prepend
   * "./" to differentiate the path from a scheme prefix.
   */
  int colon = path.indexOf(':');
  if (colon != -1) {
    int slash = path.indexOf('/');
    if (slash == -1 || colon < slash) {
      path = "./" + path;
    }
  }
  return path;
}
origin: FlexoVM/flexovm

/**
 * Returns the normalized path.
 */
private String normalize(String path, boolean discardRelativePrefix) {
  path = UrlUtils.canonicalizePath(path, discardRelativePrefix);
  /*
   * If the path contains a colon before the first colon, prepend
   * "./" to differentiate the path from a scheme prefix.
   */
  int colon = path.indexOf(':');
  if (colon != -1) {
    int slash = path.indexOf('/');
    if (slash == -1 || colon < slash) {
      path = "./" + path;
    }
  }
  return path;
}
origin: MobiVM/robovm

int idx = file.indexOf('!');
String tmpFile = file.substring(idx + 1, file.lastIndexOf('/') + 1) + spec;
tmpFile = UrlUtils.canonicalizePath(tmpFile, true);
file = file.substring(0, idx + 1) + tmpFile;
origin: ibinti/bugvm

int idx = file.indexOf('!');
String tmpFile = file.substring(idx + 1, file.lastIndexOf('/') + 1) + spec;
tmpFile = UrlUtils.canonicalizePath(tmpFile, true);
file = file.substring(0, idx + 1) + tmpFile;
origin: com.bugvm/bugvm-rt

int idx = file.indexOf('!');
String tmpFile = file.substring(idx + 1, file.lastIndexOf('/') + 1) + spec;
tmpFile = UrlUtils.canonicalizePath(tmpFile, true);
file = file.substring(0, idx + 1) + tmpFile;
origin: com.mobidevelop.robovm/robovm-rt

int idx = file.indexOf('!');
String tmpFile = file.substring(idx + 1, file.lastIndexOf('/') + 1) + spec;
tmpFile = UrlUtils.canonicalizePath(tmpFile, true);
file = file.substring(0, idx + 1) + tmpFile;
origin: com.gluonhq/robovm-rt

int idx = file.indexOf('!');
String tmpFile = file.substring(idx + 1, file.lastIndexOf('/') + 1) + spec;
tmpFile = UrlUtils.canonicalizePath(tmpFile, true);
file = file.substring(0, idx + 1) + tmpFile;
libcore.net.urlUrlUtilscanonicalizePath

Javadoc

Returns the path will relative path segments like ".." and "." resolved. The returned path will not necessarily start with a "/" character. This handles ".." and "." segments at both the beginning and end of the path.

Popular methods of UrlUtils

  • authoritySafePath
    Returns a path that can be safely concatenated with authority. If the authority is null or empty, th
  • findFirstOf
    Returns the index of the first char of chars in stringbounded between start and end. This returns en
  • getSchemePrefix
    Returns the scheme prefix like "http" from the URL spec, or null if the spec doesn't start with a sc
  • isValidSchemeChar

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Path (java.nio.file)
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now