while ((block = queue.next()) != null) {
int count = block.getUsed();
writer.write(block.getData(), 0, count);
bytes += count;
block.free(blocks);
block = null;
}
} catch (IOException ioe) {
if (output instanceof DataSource) {
((DataSource) output).failed(ioe.getMessage());
} else if (output instanceof SocketOutputStream) {
((SocketOutputStream) output).drop(true);
}
throw ioe;
} finally {
reader.reset();
writer.release();
if (block != null) {
block.free(blocks);
}
when ever I enter CTRL-C, It should throw IOException