public static Bitmap getBitmapByPath(String path) {

    Bitmap bmp = null;

    File photo = getPhotoFileByPath(path);

    if (photo.exists()) {
      bmp = Util.decodeFile(photo);
    }

    return bmp;
  }
  /**
   * Verifica se a string passada corresponde a uma data válida de acordo com o formato que está
   * sendo passado.
   *
   * @author Raphael Rossiter
   * @date 03/09/2010
   * @param data
   * @param formato
   * @return boolean
   */
  public static boolean validarData(String data, String formato) {

    boolean dataInvalida = false;

    try {

      if (data != null && !data.equals("") && data.length() == 10) {

        int diaInt = Integer.parseInt(data.substring(0, 2));
        int mesInt = Integer.parseInt(data.substring(3, 5));
        int anoInt = Integer.parseInt(data.substring(6, 10));

        if (mesInt > 12) {
          dataInvalida = true;
        }
        if (diaInt > 31) {
          dataInvalida = true;
        }

        int ultimoDiaMes = Integer.valueOf(Util.obterUltimoDiaMes(mesInt, anoInt));

        if (diaInt > ultimoDiaMes) {
          dataInvalida = true;
        }

        SimpleDateFormat formatacaoData = new SimpleDateFormat(formato, new Locale("pt", "BR"));
        formatacaoData.parse(data);

      } else {

        dataInvalida = true;
      }

    } catch (Exception e) {
      dataInvalida = true;
    }

    return dataInvalida;
  }
 public static File getTXTFile(Integer imovelAtlzCadastralId) {
   return new File(Util.completeTXTPath(imovelAtlzCadastralId));
 }
 /**
  * @author Arthur Carvalho
  * @since 28/09/2011
  * @param imovelAtlzCadastralId Id da ordem de serviço
  * @param photoTypeId Id do tipo da foto
  * @return se o arquivo foi removido
  */
 public static boolean deletePhotoFileByPath(String path) {
   return (Util.getPhotoFileByPath(path)).delete();
 }
 public static boolean photoExistsByPath(String path) {
   return (Util.getPhotoFileByPath(path)).exists();
 }
 /** Retorna um File com o caminho completo da foto* */
 public static String getFotoFile(String codigo, Integer photoTypeId) {
   return Util.completeFotoPath(codigo, photoTypeId);
 }
 /** Retorna um File com o caminho completo da foto* */
 public static File getPhotoFile(Integer imovelAtlzCadastralId, Integer photoTypeId) {
   return new File(Util.completePhotoPath(imovelAtlzCadastralId, photoTypeId));
 }