{
checkDir(outputDirectory, name);
}
else
{
FileWrapper newFile = _fileWrapperFactory.create(outputDirectory, name);
if (newFile.exists())
{
if (s_log.isInfoEnabled())
{
s_log.info("Deleting extraction file that already exists:" + newFile.getAbsolutePath());
}
newFile.delete();
}
fos = new FileOutputStream(newFile.getAbsolutePath());
byte[] buffer = new byte[ZIP_EXTRACTION_BUFFER_SIZE];
int n = 0;
while ((n = zis.read(buffer, 0, ZIP_EXTRACTION_BUFFER_SIZE)) > -1)
{
fos.write(buffer, 0, n);