@Override
	public void run()
	{
		URL url;
		int count;
		byte[] buff = new byte[1024];
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		ObjectMapper om = new ObjectMapper();
		long start;
		String resp;
		Task t = null;

		while (true)
		{
			synchronized (queue)
			{
				if (queue.isEmpty())
				{
					try
					{
						queue.wait();
					}
					catch (InterruptedException e)
					{
						e.printStackTrace();
						return;
					}
				}
				t = queue.pollLast();
			}

			if (t == null)
			{
				continue;
			}

			try
			{
				start = System.currentTimeMillis();
				url = new URL(urlHead + URLEncoder.encode(t.getInString(), "utf-8"));
				HttpURLConnection conn = (HttpURLConnection) url.openConnection();
				conn.setRequestMethod("POST");

				BufferedInputStream bis = new BufferedInputStream(conn.getInputStream());

				baos.reset();
				while ((count = bis.read(buff)) != -1)
				{
					baos.write(buff, 0, count);
				}
				baos.flush();

				resp = baos.toString("utf-8");

				if ("1".equals(PropertiesMap.getInstance().getProperty("DEBUG")))
				{
					System.out.println(resp);
				}
				Result result = (Result) om.readValue(resp, Result.class);
				String outText = String.valueOf(result);
				outText = "The following content provided by fanyi.youdao.com\n\n" + "elapsed "
						+ (System.currentTimeMillis() - start) + " ms\n\n" + result;

				t.setOutString(outText);
				dialog.onResp(outText);
			}
			catch (Exception e)
			{
				t.setOutString(String.valueOf(e));
				dialog.onResp(String.valueOf(e));
			}
			finally
			{
				lcdeque.offer(t);
				lcdeque.resetCursor();
			}
		}
	}