Explicit close streams

This commit is contained in:
Norman Maurer 2012-10-16 11:26:04 +02:00
parent e25d68238a
commit f5969778d0
2 changed files with 3 additions and 0 deletions

View File

@ -120,6 +120,7 @@ public abstract class AbstractDiskHttpData extends AbstractHttpData {
buffer.readerIndex(buffer.readerIndex() + written);
localfileChannel.force(false);
localfileChannel.close();
outputStream.close();
completed = true;
}

View File

@ -119,6 +119,7 @@ public abstract class AbstractMemoryHttpData extends AbstractHttpData {
read += fileChannel.read(byteBuffer);
}
fileChannel.close();
inputStream.close();
byteBuffer.flip();
channelBuffer = ChannelBuffers.wrappedBuffer(byteBuffer);
size = newsize;
@ -204,6 +205,7 @@ public abstract class AbstractMemoryHttpData extends AbstractHttpData {
}
fileChannel.force(false);
fileChannel.close();
outputStream.close();
isRenamed = true;
return written == length;
}