Note that there are some explanatory texts on larger screens.

plurals
  1. POhttp streaming response unsupported message type: class org.jboss.netty.handler.stream.ChunkedStream
    primarykey
    data
    text
    <p>I am trying to write a netty based http server which takes text as input and returns an image as output. This image is generated on the fly based on the input text. </p> <p>I copied the logic of org.jboss.netty.example.http.file.HttpStaticFileServerHandler into my own handler, and rather than writing a DefaultFileRegion as output in the channel, </p> <pre><code>final FileRegion region = new DefaultFileRegion(raf.getChannel(), 0, fileLength); writeFuture = ch.write(region); </code></pre> <p>I am doing the following in my own handler:</p> <pre><code>InputStream imageIOStream = imageGenerator.generateImage(inputText); ChannelFuture writeFuture = ch.write(new ChunkedStream(imageIOStream)); </code></pre> <p>But I get the following exception on the server when I try to write back to the client. </p> <pre><code>java.lang.IllegalArgumentException: unsupported message type: class org.jboss.netty.handler.stream.ChunkedStream at org.jboss.netty.channel.socket.nio.SocketSendBufferPool.acquire(SocketSendBufferPool.java:56) at org.jboss.netty.channel.socket.nio.NioWorker.write0(NioWorker.java:463) at org.jboss.netty.channel.socket.nio.NioWorker.writeFromUserCode(NioWorker.java:390) at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:137) at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:76) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:68) at org.jboss.netty.channel.Channels.write(Channels.java:611) at org.jboss.netty.channel.Channels.write(Channels.java:578) at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:251) </code></pre> <p>Can someone please help me. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload