mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-25 17:36:55 +01:00
Close file properly on compressWUDToWUX function
This commit is contained in:
parent
254d16a584
commit
03181f6078
@ -92,6 +92,7 @@ public final class WUDService {
|
|||||||
|
|
||||||
log.info("Writing compressed file to: " + outputFile.getAbsolutePath());
|
log.info("Writing compressed file to: " + outputFile.getAbsolutePath());
|
||||||
RandomAccessFile fileOutput = new RandomAccessFile(outputFile, "rw");
|
RandomAccessFile fileOutput = new RandomAccessFile(outputFile, "rw");
|
||||||
|
try {
|
||||||
|
|
||||||
WUDImageCompressedInfo info = WUDImageCompressedInfo.getDefaultCompressedInfo();
|
WUDImageCompressedInfo info = WUDImageCompressedInfo.getDefaultCompressedInfo();
|
||||||
|
|
||||||
@ -163,7 +164,9 @@ public final class WUDService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fileOutput.write(buffer.array());
|
fileOutput.write(buffer.array());
|
||||||
|
} finally {
|
||||||
fileOutput.close();
|
fileOutput.close();
|
||||||
|
}
|
||||||
|
|
||||||
return Optional.of(outputFile);
|
return Optional.of(outputFile);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user