code: private String getState(int state)
     {
        String st = "";
        switch (state)
        {
  
           case BackupJob.FINISHED :
              st = "finished";
              break;
  
           case BackupJob.WORKING :
              st = "working";
              break;
  
           case BackupJob.WAITING :
              st = "waiting";
              break;
  
           case BackupJob.STARTING :
              st = "starting";
              break;
           default :
              break;
        }
  
        return st;
     }
docs: getState.
  
  @param state
  value of state
  @return String sate