package com.wmz7year.synyed.packet.redis;

/**
 * redis复合类型字符串传输的数据包
 * 
 * @Title: RedisBulkStringPacket.java
 * @Package com.wmz7year.synyed.packet.redis
 * @author jiangwei (ydswcy513@gmail.com)
 * @date 2015年12月11日 下午8:59:27
 * @version V1.0
 */
public class RedisBulkStringPacket extends RedisPacket {
	/**
	 * 字符串内容
	 */
	private byte[] data;

	public RedisBulkStringPacket(String command) {
		super(command);
	}

	/*
	 * @see com.wmz7year.synyed.packet.redis.RedisPacket#getData()
	 */
	@Override
	public byte[] getData() {
		return data;
	}

	public void setData(byte[] data) {
		super.setCommand(new String(data));
		this.data = data;
	}

	/*
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "RedisBulkStringPacket [data=" + new String(data) + "]";
	}

}

@@ -585,62 +585,85 @@
 %7B%0A%09%09
-super.setCommand(new String(data));%0A%09%09this.data = data
+this.data = data;%0A%09%7D%0A%0A%09public String getContent() %7B%0A%09%09return new String(data)
 ;%0A%09%7D
@@ -791,31 +791,27 @@
 ata=%22 + 
-new String(data
+getContent(
 ) + %22%5D%22;

修改bulk类型字符串数据包 command值错误设置的问题