code: @Override
      public int findIn(Source source) {
          if (schemaless) {
              return -1;
          }
  
          int start = source.getOffset();
          int sourceLength = source.length();
  
          int index;
          int length = -1;
          do {
              index = sourceLength;
  
              // Prepare URL's prefixes.
              List<String> prefixes = preparePrefixes();
  
              // Find nearest prefix
              for (String prefix : prefixes) {
                  int ni = source.findFrom(start, prefix.toCharArray(), true);
                  if (ni > 0 && ni < index) {
                      index = ni;
                  }
              }
  
              // Try to parse it
              if (index < sourceLength) {
                  length = parseLength(source, index, null);
                  if (length < 0) {
                      start = index + 1;
                  }
              }
          } while (length < 0 && index < sourceLength);
  
          if (length >= 0) {
              return index;
          } else {
              return -1;
          }
      }
docs: {@inheritDoc}