private void handleChunk(HttpChunk chunk) throws IOException {
		if (!chunk.isLast()) {
			ChannelBuffer buffer = chunk.getContent();
			while (buffer.readable()) {
				byte[] dst = new byte[buffer.readableBytes()];
				buffer.readBytes(dst);
				fOutputStream.write(dst);
			}
		} else {
			// this is the last chunk
			fOutputStream.close();
			downloadFile.setLastModified(lastModified);
			sendNextFileRequest();
		}
		fOutputStream.flush();
	}