com.facebook.internal
Class Utility

java.lang.Object
  extended by com.facebook.internal.Utility

public final class Utility
extends Object

com.facebook.internal is solely for the use of other packages within the Facebook SDK for Android. Use of any of the classes in this package is unsupported, and they may be modified or removed without warning at any time.


Field Summary
static int DEFAULT_STREAM_BUFFER_SIZE
           
 
Constructor Summary
Utility()
           
 
Method Summary
static
<T> ArrayList<T>
arrayList(T... ts)
           
static Uri buildUri(String authority, String path, Bundle parameters)
           
static void clearFacebookCookies(Context context)
           
static void closeQuietly(Closeable closeable)
           
static void disconnectQuietly(URLConnection connection)
           
static String getMetadataApplicationId(Context context)
           
static Object getStringPropertyAsJSON(JSONObject jsonObject, String key, String nonJSONPropertyKey)
           
static
<T> boolean
isNullOrEmpty(Collection<T> c)
           
static boolean isNullOrEmpty(String s)
           
static
<T> boolean
isSubset(Collection<T> subset, Collection<T> superset)
           
static void logd(String tag, Exception e)
           
static void logd(String tag, String msg)
           
static void putObjectInBundle(Bundle bundle, String key, Object value)
           
static boolean queryAppAttributionSupportAndWait(String applicationId)
           
static String readStreamToString(InputStream inputStream)
           
static boolean stringsEqualOrEmpty(String a, String b)
           
static
<T> Collection<T>
unmodifiableCollection(T... ts)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_STREAM_BUFFER_SIZE

public static final int DEFAULT_STREAM_BUFFER_SIZE
See Also:
Constant Field Values
Constructor Detail

Utility

public Utility()
Method Detail

isSubset

public static <T> boolean isSubset(Collection<T> subset,
                                   Collection<T> superset)

isNullOrEmpty

public static <T> boolean isNullOrEmpty(Collection<T> c)

isNullOrEmpty

public static boolean isNullOrEmpty(String s)

unmodifiableCollection

public static <T> Collection<T> unmodifiableCollection(T... ts)

arrayList

public static <T> ArrayList<T> arrayList(T... ts)

buildUri

public static Uri buildUri(String authority,
                           String path,
                           Bundle parameters)

putObjectInBundle

public static void putObjectInBundle(Bundle bundle,
                                     String key,
                                     Object value)

closeQuietly

public static void closeQuietly(Closeable closeable)

disconnectQuietly

public static void disconnectQuietly(URLConnection connection)

getMetadataApplicationId

public static String getMetadataApplicationId(Context context)

getStringPropertyAsJSON

public static Object getStringPropertyAsJSON(JSONObject jsonObject,
                                             String key,
                                             String nonJSONPropertyKey)
                                      throws JSONException
Throws:
JSONException

readStreamToString

public static String readStreamToString(InputStream inputStream)
                                 throws IOException
Throws:
IOException

stringsEqualOrEmpty

public static boolean stringsEqualOrEmpty(String a,
                                          String b)

clearFacebookCookies

public static void clearFacebookCookies(Context context)

logd

public static void logd(String tag,
                        Exception e)

logd

public static void logd(String tag,
                        String msg)

queryAppAttributionSupportAndWait

public static boolean queryAppAttributionSupportAndWait(String applicationId)