1
votes

I came across this sample code for handling file uploads with Netty, this looks perfect, just what I needed. Unfortunately I am having difficulty incorporating this class as many Netty API features are unresolved. One of them for example is io.netty.handler.codec.http.DiskFileUpload, I am unable to find this in any of the online API docs for 3.0,3.1.3.2.

The class I am having issues with is here:

https://github.com/netty/netty/blob/master/example/src/main/java/io/netty/example/http/upload/HttpUploadServerHandler.java

I have tried using netty-3.2.5.final, 3.3.1.final, 3.4.0.Alpha

Unresolved imports:

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

Any help appricated

2

2 Answers

3
votes

When you see the org.jboss.netty namespace, that indicates v3.x

io.netty is used in v4.

Online documentation is located at http://netty.io/docs/

1
votes

It's under master branch which is 4.0.0.Alpha1-SNAPSHOT from the pom.