com.nostra13.universalimageloader.core.download
Enum ImageDownloader.Scheme

java.lang.Object
  extended by java.lang.Enum<ImageDownloader.Scheme>
      extended by com.nostra13.universalimageloader.core.download.ImageDownloader.Scheme
All Implemented Interfaces:
Serializable, Comparable<ImageDownloader.Scheme>
Enclosing interface:
ImageDownloader

public static enum ImageDownloader.Scheme
extends Enum<ImageDownloader.Scheme>

Represents supported schemes(protocols) of URI. Provides convenient methods for work with schemes and URIs.


Enum Constant Summary
ASSETS
           
CONTENT
           
DRAWABLE
           
FILE
           
HTTP
           
HTTPS
           
UNKNOWN
           
 
Method Summary
 String crop(String uri)
          Removed scheme part ("scheme://") from incoming URI
static ImageDownloader.Scheme ofUri(String uri)
          Defines scheme of incoming URI
static ImageDownloader.Scheme valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ImageDownloader.Scheme[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 String wrap(String path)
          Appends scheme to incoming path
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HTTP

public static final ImageDownloader.Scheme HTTP

HTTPS

public static final ImageDownloader.Scheme HTTPS

FILE

public static final ImageDownloader.Scheme FILE

CONTENT

public static final ImageDownloader.Scheme CONTENT

ASSETS

public static final ImageDownloader.Scheme ASSETS

DRAWABLE

public static final ImageDownloader.Scheme DRAWABLE

UNKNOWN

public static final ImageDownloader.Scheme UNKNOWN
Method Detail

values

public static ImageDownloader.Scheme[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ImageDownloader.Scheme c : ImageDownloader.Scheme.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ImageDownloader.Scheme valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

ofUri

public static ImageDownloader.Scheme ofUri(String uri)
Defines scheme of incoming URI

Parameters:
uri - URI for scheme detection
Returns:
Scheme of incoming URI

wrap

public String wrap(String path)
Appends scheme to incoming path


crop

public String crop(String uri)
Removed scheme part ("scheme://") from incoming URI



Copyright © 2011-2014. All Rights Reserved.