Issue#35 renamed fileWriter to out in SibaUtils
This commit is contained in:
parent
574b04f829
commit
576265568b
@ -65,22 +65,23 @@ public class SibaUtils
|
|||||||
public static File createMD5File(final String md5, final String fileName, final String target) throws IOException
|
public static File createMD5File(final String md5, final String fileName, final String target) throws IOException
|
||||||
{
|
{
|
||||||
File result;
|
File result;
|
||||||
FileWriter fileWriter = null;
|
FileWriter out = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result = new File(target);
|
result = new File(target);
|
||||||
fileWriter = new FileWriter(result);
|
out = new FileWriter(result);
|
||||||
fileWriter.write(md5);
|
out.write(md5);
|
||||||
String newLine = System.getProperty("line.separator");
|
String newLine = System.getProperty("line.separator");
|
||||||
fileWriter.append(" ");
|
out.append(" ");
|
||||||
fileWriter.append(fileName);
|
out.append(fileName);
|
||||||
fileWriter.append(newLine);
|
out.append(newLine);
|
||||||
fileWriter.close();
|
out.close();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
IOUtils.closeQuietly(fileWriter);
|
IOUtils.closeQuietly(out);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -182,7 +183,6 @@ public class SibaUtils
|
|||||||
FileReader in = null;
|
FileReader in = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// result = null;
|
|
||||||
if (choosenFile.exists() && (choosenFile.length() > 32))
|
if (choosenFile.exists() && (choosenFile.length() > 32))
|
||||||
{
|
{
|
||||||
in = new FileReader(choosenFile);
|
in = new FileReader(choosenFile);
|
||||||
@ -200,7 +200,6 @@ public class SibaUtils
|
|||||||
String path = System.getProperty("user.dir");
|
String path = System.getProperty("user.dir");
|
||||||
result = new File(path + "/" + fileNameToString);
|
result = new File(path + "/" + fileNameToString);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user