@@ -0,0 +1,1216 @@
+/**%0A * %0A */%0Apackage cn.strong.fastdfs.client.protocol.request;%0A%0Aimport static cn.strong.fastdfs.client.Consts.ERRNO_OK;%0Aimport static cn.strong.fastdfs.client.Consts.FDFS_GROUP_LEN;%0Aimport static cn.strong.fastdfs.client.Consts.HEAD_LEN;%0Aimport static cn.strong.fastdfs.utils.Utils.writeFixLength;%0Aimport static io.netty.util.CharsetUtil.UTF_8;%0Aimport io.netty.buffer.ByteBuf;%0Aimport io.netty.buffer.ByteBufUtil;%0Aimport io.netty.channel.ChannelHandlerContext;%0A%0Aimport java.util.List;%0A%0Aimport cn.strong.fastdfs.model.StoragePath;%0A%0A/**%0A * %E8%AF%B7%E6%B1%82%E5%86%85%E5%AE%B9%E4%B8%BA%E5%AD%98%E5%82%A8%E8%B7%AF%E5%BE%84%E7%9A%84%E8%AF%B7%E6%B1%82%0A * %0A * @author liulongbiao%0A *%0A */%0Apublic abstract class AbstractStoragePathRequest implements Request %7B%0A%0A%09private StoragePath spath;%0A%0A%09public AbstractStoragePathRequest(StoragePath spath) %7B%0A%09%09this.spath = spath;%0A%09%7D%0A%0A%09@Override%0A%09public void encode(ChannelHandlerContext ctx, List%3CObject%3E out) %7B%0A%09%09int length = FDFS_GROUP_LEN + spath.path.getBytes(UTF_8).length;%0A%09%09byte cmd = cmd();%0A%09%09ByteBuf buf = ctx.alloc().buffer(length + HEAD_LEN);%0A%09%09buf.writeLong(length);%0A%09%09buf.writeByte(cmd);%0A%09%09buf.writeByte(ERRNO_OK);%0A%09%09writeFixLength(buf, spath.group, FDFS_GROUP_LEN, UTF_8);%0A%09%09ByteBufUtil.writeUtf8(buf, spath.path);%0A%09%09out.add(buf);%0A%09%7D%0A%0A%09protected abstract byte cmd();%0A%0A%7D%0A

add AbstractStoragePathRequest