public enum NetworkPolicy extends java.lang.Enum<NetworkPolicy>
Enum Constant and Description |
---|
NO_CACHE
Skips checking the disk cache and forces loading through the network.
|
NO_STORE
Skips storing the result into the disk cache.
|
OFFLINE
Forces the request through the disk cache only, skipping network.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isOfflineOnly(int networkPolicy) |
static boolean |
shouldReadFromDiskCache(int networkPolicy) |
static boolean |
shouldWriteToDiskCache(int networkPolicy) |
static NetworkPolicy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static NetworkPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NetworkPolicy NO_CACHE
public static final NetworkPolicy NO_STORE
public static final NetworkPolicy OFFLINE
public static NetworkPolicy[] values()
for (NetworkPolicy c : NetworkPolicy.values()) System.out.println(c);
public static NetworkPolicy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static boolean shouldReadFromDiskCache(int networkPolicy)
public static boolean shouldWriteToDiskCache(int networkPolicy)
public static boolean isOfflineOnly(int networkPolicy)