Package com.aerisweather.aeris.util
Class FileUtil
- java.lang.Object
-
- com.aerisweather.aeris.util.FileUtil
-
public class FileUtil extends Object
File util for accessing files within the project.
-
-
Constructor Summary
Constructors Constructor Description FileUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
convertStreamToString(InputStream is)
Converts the file to a string.static int
getDrawableByName(String name, android.content.Context context)
Gets the drawable by the string name.
-
-
-
Method Detail
-
getDrawableByName
public static int getDrawableByName(String name, android.content.Context context)
Gets the drawable by the string name. This is used in conjunction with the icon field in many of the forecast, observation. Accesses the name from the drawable folder.- Parameters:
name
- name of the drawablecontext
- context to get the drawale from.- Returns:
- the int id of the drawable.
-
convertStreamToString
public static String convertStreamToString(InputStream is)
Converts the file to a string.- Parameters:
is
- The input stream to use.- Returns:
- String output from the file.
-
-