Class FileUtil


  • public class FileUtil
    extends Object
    File util for accessing files within the project.
    • Constructor Detail

      • FileUtil

        public FileUtil()
    • 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 drawable
        context - 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.