【发布时间】:2026-02-12 20:25:02
【问题描述】:
我遇到了这个使用 Netty 处理文件上传的示例代码,这看起来很完美,正是我所需要的。不幸的是,我很难合并这个类,因为许多 Netty API 功能都没有得到解决。例如,其中之一是 io.netty.handler.codec.http.DiskFileUpload,我无法在 3.0、3.1.3.2 的任何在线 API 文档中找到它。
我遇到问题的课程在这里:
我尝试过使用 netty-3.2.5.final、3.3.1.final、3.4.0.Alpha
未解决的导入:
import org.jboss.netty.handler.codec.http.HttpPostRequestDecoder.EndOfDataDecoderException;
import org.jboss.netty.handler.codec.http.HttpPostRequestDecoder.ErrorDataDecoderException;
import org.jboss.netty.handler.codec.http.HttpPostRequestDecoder.IncompatibleDataDecoderException;
import org.jboss.netty.handler.codec.http.HttpPostRequestDecoder.NotEnoughDataDecoderException;
import org.jboss.netty.handler.codec.http.InterfaceHttpData;
import org.jboss.netty.handler.codec.http.InterfaceHttpData.HttpDataType
import org.jboss.netty.handler.codec.http.HttpDataFactory;
import org.jboss.netty.handler.codec.http.DiskAttribute;
import org.jboss.netty.handler.codec.http.DiskFileUpload;
import org.jboss.netty.handler.codec.http.FileUpload;
import org.jboss.netty.handler.codec.http.DefaultHttpDataFactory;
import org.jboss.netty.handler.codec.http.Attribute
有任何帮助
【问题讨论】: