private void handleHtttpResponse(DefaultHttpResponse response)
			throws IOException {
		if (response.getStatus().equals(HttpResponseStatus.NOT_MODIFIED)) {
			logger.info(downloadFile.getName() + " is not modified!");
			sendNextFileRequest();
		} else {
			String type = response.getHeader("UPTYPE");
			// handle the directory response
			if (type.equals("dir")) {
				String files = response.getContent()
						.toString(CharsetUtil.UTF_8);
				fileList = files.split("///");
				for (String f : fileList)
					logger.info(f);
				sendNextFileRequest();
			}
			// handle the file response
			else if (type.equals("file")) {
				logger.info("get file httpResponse   name:"
						+ response.getHeader("UPNAME"));
				lastModified = Long.parseLong(response
						.getHeader(Names.CACHE_CONTROL));
				fOutputStream = new FileOutputStream(downloadFile);
				// if the file is not big enought to be chunked
				if (!response.isChunked()) {
					ChannelBuffer buffer = response.getContent();
					while (buffer.readable()) {
						byte[] dst = new byte[buffer.readableBytes()];
						buffer.readBytes(dst);
						fOutputStream.write(dst);
					}
					fOutputStream.close();
					downloadFile.setLastModified(lastModified);
					sendNextFileRequest();
					/*
					 * System.out
					 * .println("receive a file which is not chunked! name:" +
					 * response.getHeader("UPNAME"));
					 */
					logger.info("file" + response.getHeader("UPNAME")
							+ " is not chunked");
				}
			}
		}
	}