Tabnine Logo
UrlUtils.isValidSchemeChar
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: robovm/robovm

private String validateScheme(String uri, int end) throws URISyntaxException {
  if (end == 0) {
    throw new URISyntaxException(uri, "Scheme expected", 0);
  }
  for (int i = 0; i < end; i++) {
    if (!UrlUtils.isValidSchemeChar(i, uri.charAt(i))) {
      throw new URISyntaxException(uri, "Illegal character in scheme", 0);
    }
  }
  return uri.substring(0, end);
}
origin: robovm/robovm

/**
 * Returns the scheme prefix like "http" from the URL spec, or null if the
 * spec doesn't start with a scheme. Scheme prefixes match this pattern:
 * {@code alpha ( alpha | digit | '+' | '-' | '.' )* ':'}
 */
public static String getSchemePrefix(String spec) {
  int colon = spec.indexOf(':');
  if (colon < 1) {
    return null;
  }
  for (int i = 0; i < colon; i++) {
    char c = spec.charAt(i);
    if (!isValidSchemeChar(i, c)) {
      return null;
    }
  }
  return spec.substring(0, colon).toLowerCase(Locale.US);
}
origin: FlexoVM/flexovm

private String validateScheme(String uri, int end) throws URISyntaxException {
  if (end == 0) {
    throw new URISyntaxException(uri, "Scheme expected", 0);
  }
  for (int i = 0; i < end; i++) {
    if (!UrlUtils.isValidSchemeChar(i, uri.charAt(i))) {
      throw new URISyntaxException(uri, "Illegal character in scheme", 0);
    }
  }
  return uri.substring(0, end);
}
origin: com.gluonhq/robovm-rt

private String validateScheme(String uri, int end) throws URISyntaxException {
  if (end == 0) {
    throw new URISyntaxException(uri, "Scheme expected", 0);
  }
  for (int i = 0; i < end; i++) {
    if (!UrlUtils.isValidSchemeChar(i, uri.charAt(i))) {
      throw new URISyntaxException(uri, "Illegal character in scheme", 0);
    }
  }
  return uri.substring(0, end);
}
origin: MobiVM/robovm

private String validateScheme(String uri, int end) throws URISyntaxException {
  if (end == 0) {
    throw new URISyntaxException(uri, "Scheme expected", 0);
  }
  for (int i = 0; i < end; i++) {
    if (!UrlUtils.isValidSchemeChar(i, uri.charAt(i))) {
      throw new URISyntaxException(uri, "Illegal character in scheme", 0);
    }
  }
  return uri.substring(0, end);
}
origin: ibinti/bugvm

private String validateScheme(String uri, int end) throws URISyntaxException {
  if (end == 0) {
    throw new URISyntaxException(uri, "Scheme expected", 0);
  }
  for (int i = 0; i < end; i++) {
    if (!UrlUtils.isValidSchemeChar(i, uri.charAt(i))) {
      throw new URISyntaxException(uri, "Illegal character in scheme", 0);
    }
  }
  return uri.substring(0, end);
}
origin: com.mobidevelop.robovm/robovm-rt

private String validateScheme(String uri, int end) throws URISyntaxException {
  if (end == 0) {
    throw new URISyntaxException(uri, "Scheme expected", 0);
  }
  for (int i = 0; i < end; i++) {
    if (!UrlUtils.isValidSchemeChar(i, uri.charAt(i))) {
      throw new URISyntaxException(uri, "Illegal character in scheme", 0);
    }
  }
  return uri.substring(0, end);
}
origin: com.bugvm/bugvm-rt

private String validateScheme(String uri, int end) throws URISyntaxException {
  if (end == 0) {
    throw new URISyntaxException(uri, "Scheme expected", 0);
  }
  for (int i = 0; i < end; i++) {
    if (!UrlUtils.isValidSchemeChar(i, uri.charAt(i))) {
      throw new URISyntaxException(uri, "Illegal character in scheme", 0);
    }
  }
  return uri.substring(0, end);
}
origin: com.bugvm/bugvm-rt

/**
 * Returns the scheme prefix like "http" from the URL spec, or null if the
 * spec doesn't start with a scheme. Scheme prefixes match this pattern:
 * {@code alpha ( alpha | digit | '+' | '-' | '.' )* ':'}
 */
public static String getSchemePrefix(String spec) {
  int colon = spec.indexOf(':');
  if (colon < 1) {
    return null;
  }
  for (int i = 0; i < colon; i++) {
    char c = spec.charAt(i);
    if (!isValidSchemeChar(i, c)) {
      return null;
    }
  }
  return spec.substring(0, colon).toLowerCase(Locale.US);
}
origin: MobiVM/robovm

/**
 * Returns the scheme prefix like "http" from the URL spec, or null if the
 * spec doesn't start with a scheme. Scheme prefixes match this pattern:
 * {@code alpha ( alpha | digit | '+' | '-' | '.' )* ':'}
 */
public static String getSchemePrefix(String spec) {
  int colon = spec.indexOf(':');
  if (colon < 1) {
    return null;
  }
  for (int i = 0; i < colon; i++) {
    char c = spec.charAt(i);
    if (!isValidSchemeChar(i, c)) {
      return null;
    }
  }
  return spec.substring(0, colon).toLowerCase(Locale.US);
}
origin: ibinti/bugvm

/**
 * Returns the scheme prefix like "http" from the URL spec, or null if the
 * spec doesn't start with a scheme. Scheme prefixes match this pattern:
 * {@code alpha ( alpha | digit | '+' | '-' | '.' )* ':'}
 */
public static String getSchemePrefix(String spec) {
  int colon = spec.indexOf(':');
  if (colon < 1) {
    return null;
  }
  for (int i = 0; i < colon; i++) {
    char c = spec.charAt(i);
    if (!isValidSchemeChar(i, c)) {
      return null;
    }
  }
  return spec.substring(0, colon).toLowerCase(Locale.US);
}
origin: FlexoVM/flexovm

/**
 * Returns the scheme prefix like "http" from the URL spec, or null if the
 * spec doesn't start with a scheme. Scheme prefixes match this pattern:
 * {@code alpha ( alpha | digit | '+' | '-' | '.' )* ':'}
 */
public static String getSchemePrefix(String spec) {
  int colon = spec.indexOf(':');
  if (colon < 1) {
    return null;
  }
  for (int i = 0; i < colon; i++) {
    char c = spec.charAt(i);
    if (!isValidSchemeChar(i, c)) {
      return null;
    }
  }
  return spec.substring(0, colon).toLowerCase(Locale.US);
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns the scheme prefix like "http" from the URL spec, or null if the
 * spec doesn't start with a scheme. Scheme prefixes match this pattern:
 * {@code alpha ( alpha | digit | '+' | '-' | '.' )* ':'}
 */
public static String getSchemePrefix(String spec) {
  int colon = spec.indexOf(':');
  if (colon < 1) {
    return null;
  }
  for (int i = 0; i < colon; i++) {
    char c = spec.charAt(i);
    if (!isValidSchemeChar(i, c)) {
      return null;
    }
  }
  return spec.substring(0, colon).toLowerCase(Locale.US);
}
origin: com.gluonhq/robovm-rt

/**
 * Returns the scheme prefix like "http" from the URL spec, or null if the
 * spec doesn't start with a scheme. Scheme prefixes match this pattern:
 * {@code alpha ( alpha | digit | '+' | '-' | '.' )* ':'}
 */
public static String getSchemePrefix(String spec) {
  int colon = spec.indexOf(':');
  if (colon < 1) {
    return null;
  }
  for (int i = 0; i < colon; i++) {
    char c = spec.charAt(i);
    if (!isValidSchemeChar(i, c)) {
      return null;
    }
  }
  return spec.substring(0, colon).toLowerCase(Locale.US);
}
libcore.net.urlUrlUtilsisValidSchemeChar

Popular methods of UrlUtils

  • authoritySafePath
    Returns a path that can be safely concatenated with authority. If the authority is null or empty, th
  • canonicalizePath
    Returns the path will relative path segments like ".." and "." resolved. The returned path will not
  • 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

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Path (java.nio.file)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now