@Override
   protected LiveWeatherBean parseLine(String line) {
      LiveWeatherBean bean = new LiveWeatherBean();
      try {

         String[] items = line.split(",");
         bean.setLinkId(Integer.parseInt(items[0].trim()));

         Date time;
         if (items[3].trim().equals("") || items[3].trim() == null) {
            time = null;
         } else {
            time = df.parse(items[3].trim());
            bean.setTimeStamp(new Timestamp(time.getTime()));
         }
         // Check if rainfall is null
         if (items[2].trim().equals("") || items[2].trim() == null) {
            bean.setRain(0);
         } else {
            bean.setRain(Double.parseDouble(items[2].trim()));

         }
         // Check if temperature is null
         if (items[1].trim().equals("") || items[1].trim() == null) {
            bean.setTemperature(0);
         } else {
            bean.setTemperature(Double.parseDouble(items[1].trim()));
         }

      } catch (Exception e) {
         e.printStackTrace();
      }

      return bean;

   }