fixes bug#15005
dev: julio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@95823 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
6e2f7db0ba
commit
af71507c3a
|
@ -106,19 +106,20 @@ public class BusquedaBpeExportacaoController extends MyGenericForwardComposer {
|
|||
public File criarArquivo(final String writerExp, final String nomeArquivo) {
|
||||
File file = null;
|
||||
PrintWriter writer = null;
|
||||
try {
|
||||
file = File.createTempFile(nomeArquivo + "-", ".fs");
|
||||
writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(file), Constantes.UTF_8));
|
||||
writer.write(writerExp);
|
||||
} catch (IOException e) {
|
||||
log.error("", e);
|
||||
if (writerExp != null) {
|
||||
try {
|
||||
file = File.createTempFile(nomeArquivo + "-", ".fs");
|
||||
writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(file), Constantes.UTF_8));
|
||||
writer.write(writerExp);
|
||||
} catch (IOException e) {
|
||||
log.error("", e);
|
||||
|
||||
} finally {
|
||||
if (writer != null) {
|
||||
writer.close();
|
||||
} finally {
|
||||
if (writer != null) {
|
||||
writer.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue