humble-video-noarch/src/main/java/io/humble/video/customio/URLProtocolManager.java
public static String getProtocolFromURL(String url)
  {
    String retval = null;
    if (url != null && url.length() > 0)
    {
      int colonIndex = url.indexOf(":");
      if (colonIndex > 0)
      {
        // remove the URL suffix
        retval = url.substring(0, colonIndex);
      }
    }
    return retval;
  }
public static String getProtocolFromURL(String url)
  {
    String retval = null;
    if (url != null && url.length() > 0)
    {
      int colonIndex = url.indexOf(":");
      if (colonIndex > 0)
      {
        // remove the URL suffix
        retval = url.substring(0, colonIndex);
      }
    }
    return retval;
  }
public static String getProtocolFromURL ( String url ) { String retval = null ; if ( url != null && url . length ( ) > 0 ) { int colonIndex = url . indexOf ( ":" ) ; if ( colonIndex > 0 ) { // remove the URL suffix retval = url . substring ( 0 , colonIndex ) ; } } return retval ; }
Get the protocol portion of a url.  For example for the URL
<pre>
http://www.humble.io/video
</pre>
The protocol string is <code>http</code> and the resource
string is <code>//www.humble.io/video</code>

@param url The url to parse
@return The protocol
Get the protocol portion of a url . For example for the URL <pre > http : // www . humble . io / video < / pre > The protocol string is <code > http< / code > and the resource string is <code > // www . humble . io / video< / code >