Make sure we close the output stream on close()
Otherwise this can result in memory leaks.
@@ -76,9 +76,13 @@ public class BufferedOutputStreamSliceOutput
public void close()
throws IOException
{
+ try {
flushBufferToOutputStream();
+ }
+ finally {
outputStream.close();
}
+ }
@Override
public void reset()
