Explicit close streams
This commit is contained in:
parent
e25d68238a
commit
f5969778d0
@ -120,6 +120,7 @@ public abstract class AbstractDiskHttpData extends AbstractHttpData {
|
||||
buffer.readerIndex(buffer.readerIndex() + written);
|
||||
localfileChannel.force(false);
|
||||
localfileChannel.close();
|
||||
outputStream.close();
|
||||
completed = true;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user