Class NettyInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.glassfish.jersey.netty.connector.internal.NettyInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class NettyInputStream extends InputStream
Input stream which servers as Request entity input.Converts Netty NIO buffers to an input streams and stores them in the queue, waiting for Jersey to process it.
- Author:
- Pavel Bucek
-
-
Constructor Summary
Constructors Constructor Description NettyInputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()protected ByteBufferawaitNext()protected voidcleanup(boolean drain)voidclear()voidclose()voidcomplete(Throwable cause)voidpublish(io.netty.buffer.ByteBuf content)intread()intread(byte[] b, int off, int len)-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Method Detail
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
awaitNext
protected ByteBuffer awaitNext()
-
complete
public void complete(Throwable cause)
-
cleanup
protected void cleanup(boolean drain)
-
available
public int available() throws IOException- Overrides:
availablein classInputStream- Throws:
IOException
-
publish
public void publish(io.netty.buffer.ByteBuf content)
-
clear
public void clear()
-
-