congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
UrlUtils.findFirstOf
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: robovm/robovm

fileStart = UrlUtils.findFirstOf(spec, "/?#", authorityStart, end);
authority = spec.substring(authorityStart, fileStart);
int userInfoEnd = UrlUtils.findFirstOf(spec, "@", authorityStart, fileStart);
int hostStart;
if (userInfoEnd != fileStart) {
int ipv6End = UrlUtils.findFirstOf(spec, "]", hostStart, fileStart);
if (ipv6End != fileStart) {
  if (UrlUtils.findFirstOf(spec, ":", hostStart, ipv6End) == ipv6End) {
    throw new IllegalArgumentException("Expected an IPv6 address: "
        + spec.substring(hostStart, ipv6End + 1));
int hostEnd = UrlUtils.findFirstOf(spec, ":", colonSearchFrom, fileStart);
host = spec.substring(hostStart, hostEnd);
int portStart = hostEnd + 1;
  break;
case '?':
  nextPos = UrlUtils.findFirstOf(spec, "#", pos, end);
  query = spec.substring(pos + 1, nextPos);
  ref = null;
  break;
default:
  nextPos = UrlUtils.findFirstOf(spec, "?#", pos, end);
  path = relativePath(path, spec.substring(pos, nextPos));
  query = null;
origin: robovm/robovm

int fragmentStart = UrlUtils.findFirstOf(uri, "#", 0, uri.length());
if (fragmentStart < uri.length()) {
  fragment = ALL_LEGAL_ENCODER.validate(uri, fragmentStart + 1, uri.length(), "fragment");
int colon = UrlUtils.findFirstOf(uri, ":", 0, fragmentStart);
if (colon < UrlUtils.findFirstOf(uri, "/?#", 0, fragmentStart)) {
  absolute = true;
  scheme = validateScheme(uri, colon);
if (uri.regionMatches(start, "//", 0, 2)) {
  int authorityStart = start + 2;
  fileStart = UrlUtils.findFirstOf(uri, "/?", authorityStart, fragmentStart);
  if (authorityStart == uri.length()) {
    throw new URISyntaxException(uri, "Authority expected", uri.length());
int queryStart = UrlUtils.findFirstOf(uri, "?", fileStart, fragmentStart);
path = PATH_ENCODER.validate(uri, fileStart, queryStart, "path");
origin: com.gluonhq/robovm-rt

fileStart = UrlUtils.findFirstOf(spec, "/?#", authorityStart, end);
authority = spec.substring(authorityStart, fileStart);
int userInfoEnd = UrlUtils.findFirstOf(spec, "@", authorityStart, fileStart);
int hostStart;
if (userInfoEnd != fileStart) {
int ipv6End = UrlUtils.findFirstOf(spec, "]", hostStart, fileStart);
if (ipv6End != fileStart) {
  if (UrlUtils.findFirstOf(spec, ":", hostStart, ipv6End) == ipv6End) {
    throw new IllegalArgumentException("Expected an IPv6 address: "
        + spec.substring(hostStart, ipv6End + 1));
int hostEnd = UrlUtils.findFirstOf(spec, ":", colonSearchFrom, fileStart);
host = spec.substring(hostStart, hostEnd);
int portStart = hostEnd + 1;
  break;
case '?':
  nextPos = UrlUtils.findFirstOf(spec, "#", pos, end);
  query = spec.substring(pos + 1, nextPos);
  ref = null;
  break;
default:
  nextPos = UrlUtils.findFirstOf(spec, "?#", pos, end);
  path = relativePath(path, spec.substring(pos, nextPos));
  query = null;
origin: ibinti/bugvm

fileStart = UrlUtils.findFirstOf(spec, "/?#", authorityStart, end);
authority = spec.substring(authorityStart, fileStart);
int userInfoEnd = UrlUtils.findFirstOf(spec, "@", authorityStart, fileStart);
int hostStart;
if (userInfoEnd != fileStart) {
int ipv6End = UrlUtils.findFirstOf(spec, "]", hostStart, fileStart);
if (ipv6End != fileStart) {
  if (UrlUtils.findFirstOf(spec, ":", hostStart, ipv6End) == ipv6End) {
    throw new IllegalArgumentException("Expected an IPv6 address: "
        + spec.substring(hostStart, ipv6End + 1));
int hostEnd = UrlUtils.findFirstOf(spec, ":", colonSearchFrom, fileStart);
host = spec.substring(hostStart, hostEnd);
int portStart = hostEnd + 1;
  break;
case '?':
  nextPos = UrlUtils.findFirstOf(spec, "#", pos, end);
  query = spec.substring(pos + 1, nextPos);
  ref = null;
  break;
default:
  nextPos = UrlUtils.findFirstOf(spec, "?#", pos, end);
  path = relativePath(path, spec.substring(pos, nextPos));
  query = null;
origin: MobiVM/robovm

fileStart = UrlUtils.findFirstOf(spec, "/?#", authorityStart, end);
authority = spec.substring(authorityStart, fileStart);
int userInfoEnd = UrlUtils.findFirstOf(spec, "@", authorityStart, fileStart);
int hostStart;
if (userInfoEnd != fileStart) {
int ipv6End = UrlUtils.findFirstOf(spec, "]", hostStart, fileStart);
if (ipv6End != fileStart) {
  if (UrlUtils.findFirstOf(spec, ":", hostStart, ipv6End) == ipv6End) {
    throw new IllegalArgumentException("Expected an IPv6 address: "
        + spec.substring(hostStart, ipv6End + 1));
int hostEnd = UrlUtils.findFirstOf(spec, ":", colonSearchFrom, fileStart);
host = spec.substring(hostStart, hostEnd);
int portStart = hostEnd + 1;
  break;
case '?':
  nextPos = UrlUtils.findFirstOf(spec, "#", pos, end);
  query = spec.substring(pos + 1, nextPos);
  ref = null;
  break;
default:
  nextPos = UrlUtils.findFirstOf(spec, "?#", pos, end);
  path = relativePath(path, spec.substring(pos, nextPos));
  query = null;
origin: com.bugvm/bugvm-rt

fileStart = UrlUtils.findFirstOf(spec, "/?#", authorityStart, end);
authority = spec.substring(authorityStart, fileStart);
int userInfoEnd = UrlUtils.findFirstOf(spec, "@", authorityStart, fileStart);
int hostStart;
if (userInfoEnd != fileStart) {
int ipv6End = UrlUtils.findFirstOf(spec, "]", hostStart, fileStart);
if (ipv6End != fileStart) {
  if (UrlUtils.findFirstOf(spec, ":", hostStart, ipv6End) == ipv6End) {
    throw new IllegalArgumentException("Expected an IPv6 address: "
        + spec.substring(hostStart, ipv6End + 1));
int hostEnd = UrlUtils.findFirstOf(spec, ":", colonSearchFrom, fileStart);
host = spec.substring(hostStart, hostEnd);
int portStart = hostEnd + 1;
  break;
case '?':
  nextPos = UrlUtils.findFirstOf(spec, "#", pos, end);
  query = spec.substring(pos + 1, nextPos);
  ref = null;
  break;
default:
  nextPos = UrlUtils.findFirstOf(spec, "?#", pos, end);
  path = relativePath(path, spec.substring(pos, nextPos));
  query = null;
origin: com.mobidevelop.robovm/robovm-rt

int fragmentStart = UrlUtils.findFirstOf(uri, "#", 0, uri.length());
if (fragmentStart < uri.length()) {
  fragment = ALL_LEGAL_ENCODER.validate(uri, fragmentStart + 1, uri.length(), "fragment");
int colon = UrlUtils.findFirstOf(uri, ":", 0, fragmentStart);
if (colon < UrlUtils.findFirstOf(uri, "/?#", 0, fragmentStart)) {
  absolute = true;
  scheme = validateScheme(uri, colon);
if (uri.regionMatches(start, "//", 0, 2)) {
  int authorityStart = start + 2;
  fileStart = UrlUtils.findFirstOf(uri, "/?", authorityStart, fragmentStart);
  if (authorityStart == uri.length()) {
    throw new URISyntaxException(uri, "Authority expected", uri.length());
int queryStart = UrlUtils.findFirstOf(uri, "?", fileStart, fragmentStart);
path = PATH_ENCODER.validate(uri, fileStart, queryStart, "path");
origin: com.mobidevelop.robovm/robovm-rt

fileStart = UrlUtils.findFirstOf(spec, "/?#", authorityStart, end);
authority = spec.substring(authorityStart, fileStart);
int userInfoEnd = UrlUtils.findFirstOf(spec, "@", authorityStart, fileStart);
int hostStart;
if (userInfoEnd != fileStart) {
int ipv6End = UrlUtils.findFirstOf(spec, "]", hostStart, fileStart);
if (ipv6End != fileStart) {
  if (UrlUtils.findFirstOf(spec, ":", hostStart, ipv6End) == ipv6End) {
    throw new IllegalArgumentException("Expected an IPv6 address: "
        + spec.substring(hostStart, ipv6End + 1));
int hostEnd = UrlUtils.findFirstOf(spec, ":", colonSearchFrom, fileStart);
host = spec.substring(hostStart, hostEnd);
int portStart = hostEnd + 1;
  break;
case '?':
  nextPos = UrlUtils.findFirstOf(spec, "#", pos, end);
  query = spec.substring(pos + 1, nextPos);
  ref = null;
  break;
default:
  nextPos = UrlUtils.findFirstOf(spec, "?#", pos, end);
  path = relativePath(path, spec.substring(pos, nextPos));
  query = null;
origin: FlexoVM/flexovm

fileStart = UrlUtils.findFirstOf(spec, "/?#", authorityStart, end);
authority = spec.substring(authorityStart, fileStart);
int userInfoEnd = UrlUtils.findFirstOf(spec, "@", authorityStart, fileStart);
int hostStart;
if (userInfoEnd != fileStart) {
int ipv6End = UrlUtils.findFirstOf(spec, "]", hostStart, fileStart);
if (ipv6End != fileStart) {
  if (UrlUtils.findFirstOf(spec, ":", hostStart, ipv6End) == ipv6End) {
    throw new IllegalArgumentException("Expected an IPv6 address: "
        + spec.substring(hostStart, ipv6End + 1));
int hostEnd = UrlUtils.findFirstOf(spec, ":", colonSearchFrom, fileStart);
host = spec.substring(hostStart, hostEnd);
int portStart = hostEnd + 1;
  break;
case '?':
  nextPos = UrlUtils.findFirstOf(spec, "#", pos, end);
  query = spec.substring(pos + 1, nextPos);
  ref = null;
  break;
default:
  nextPos = UrlUtils.findFirstOf(spec, "?#", pos, end);
  path = relativePath(path, spec.substring(pos, nextPos));
  query = null;
origin: com.bugvm/bugvm-rt

int fragmentStart = UrlUtils.findFirstOf(uri, "#", 0, uri.length());
if (fragmentStart < uri.length()) {
  fragment = ALL_LEGAL_ENCODER.validate(uri, fragmentStart + 1, uri.length(), "fragment");
int colon = UrlUtils.findFirstOf(uri, ":", 0, fragmentStart);
if (colon < UrlUtils.findFirstOf(uri, "/?#", 0, fragmentStart)) {
  absolute = true;
  scheme = validateScheme(uri, colon);
if (uri.regionMatches(start, "//", 0, 2)) {
  int authorityStart = start + 2;
  fileStart = UrlUtils.findFirstOf(uri, "/?", authorityStart, fragmentStart);
  if (authorityStart == uri.length()) {
    throw new URISyntaxException(uri, "Authority expected", uri.length());
int queryStart = UrlUtils.findFirstOf(uri, "?", fileStart, fragmentStart);
path = PATH_ENCODER.validate(uri, fileStart, queryStart, "path");
origin: MobiVM/robovm

int fragmentStart = UrlUtils.findFirstOf(uri, "#", 0, uri.length());
if (fragmentStart < uri.length()) {
  fragment = ALL_LEGAL_ENCODER.validate(uri, fragmentStart + 1, uri.length(), "fragment");
int colon = UrlUtils.findFirstOf(uri, ":", 0, fragmentStart);
if (colon < UrlUtils.findFirstOf(uri, "/?#", 0, fragmentStart)) {
  absolute = true;
  scheme = validateScheme(uri, colon);
if (uri.regionMatches(start, "//", 0, 2)) {
  int authorityStart = start + 2;
  fileStart = UrlUtils.findFirstOf(uri, "/?", authorityStart, fragmentStart);
  if (authorityStart == uri.length()) {
    throw new URISyntaxException(uri, "Authority expected", uri.length());
int queryStart = UrlUtils.findFirstOf(uri, "?", fileStart, fragmentStart);
path = PATH_ENCODER.validate(uri, fileStart, queryStart, "path");
origin: ibinti/bugvm

int fragmentStart = UrlUtils.findFirstOf(uri, "#", 0, uri.length());
if (fragmentStart < uri.length()) {
  fragment = ALL_LEGAL_ENCODER.validate(uri, fragmentStart + 1, uri.length(), "fragment");
int colon = UrlUtils.findFirstOf(uri, ":", 0, fragmentStart);
if (colon < UrlUtils.findFirstOf(uri, "/?#", 0, fragmentStart)) {
  absolute = true;
  scheme = validateScheme(uri, colon);
if (uri.regionMatches(start, "//", 0, 2)) {
  int authorityStart = start + 2;
  fileStart = UrlUtils.findFirstOf(uri, "/?", authorityStart, fragmentStart);
  if (authorityStart == uri.length()) {
    throw new URISyntaxException(uri, "Authority expected", uri.length());
int queryStart = UrlUtils.findFirstOf(uri, "?", fileStart, fragmentStart);
path = PATH_ENCODER.validate(uri, fileStart, queryStart, "path");
origin: FlexoVM/flexovm

int fragmentStart = UrlUtils.findFirstOf(uri, "#", 0, uri.length());
if (fragmentStart < uri.length()) {
  fragment = ALL_LEGAL_ENCODER.validate(uri, fragmentStart + 1, uri.length(), "fragment");
int colon = UrlUtils.findFirstOf(uri, ":", 0, fragmentStart);
if (colon < UrlUtils.findFirstOf(uri, "/?#", 0, fragmentStart)) {
  absolute = true;
  scheme = validateScheme(uri, colon);
if (uri.regionMatches(start, "//", 0, 2)) {
  int authorityStart = start + 2;
  fileStart = UrlUtils.findFirstOf(uri, "/?", authorityStart, fragmentStart);
  if (authorityStart == uri.length()) {
    throw new URISyntaxException(uri, "Authority expected", uri.length());
int queryStart = UrlUtils.findFirstOf(uri, "?", fileStart, fragmentStart);
path = PATH_ENCODER.validate(uri, fileStart, queryStart, "path");
origin: com.gluonhq/robovm-rt

int fragmentStart = UrlUtils.findFirstOf(uri, "#", 0, uri.length());
if (fragmentStart < uri.length()) {
  fragment = ALL_LEGAL_ENCODER.validate(uri, fragmentStart + 1, uri.length(), "fragment");
int colon = UrlUtils.findFirstOf(uri, ":", 0, fragmentStart);
if (colon < UrlUtils.findFirstOf(uri, "/?#", 0, fragmentStart)) {
  absolute = true;
  scheme = validateScheme(uri, colon);
if (uri.regionMatches(start, "//", 0, 2)) {
  int authorityStart = start + 2;
  fileStart = UrlUtils.findFirstOf(uri, "/?", authorityStart, fragmentStart);
  if (authorityStart == uri.length()) {
    throw new URISyntaxException(uri, "Authority expected", uri.length());
int queryStart = UrlUtils.findFirstOf(uri, "?", fileStart, fragmentStart);
path = PATH_ENCODER.validate(uri, fileStart, queryStart, "path");
libcore.net.urlUrlUtilsfindFirstOf

Javadoc

Returns the index of the first char of chars in stringbounded between start and end. This returns endif none of the characters exist in the requested range.

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
  • 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

  • Start an intent from android
  • getExternalFilesDir (Context)
  • getSupportFragmentManager (FragmentActivity)
  • getContentResolver (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • JTable (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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