public class ServletOutputStreamWrapper extends javax.servlet.ServletOutputStream implements Wrapper<ServletOutputStream>, Recyclable, NettyOutputStream
| 构造器和说明 |
|---|
ServletOutputStreamWrapper(io.netty.channel.ChannelFutureListener closeListener) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
close http.
|
void |
flush()
batch send packet.
|
boolean |
isReady() |
boolean |
isSuspendFlag()
Whether to pause the operation output stream
|
<T> void |
recycle(Consumer<T> consumer)
async recycle
|
void |
resetBuffer() |
void |
setSuspendFlag(boolean suspendFlag)
Set (on/off) to pause the output operation
|
void |
setWriteListener(javax.servlet.WriteListener listener) |
ServletOutputStream |
unwrap()
get source object
|
void |
wrap(ServletOutputStream source)
wrap
|
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
io.netty.channel.ChannelProgressivePromise |
write(io.netty.buffer.ByteBuf httpBody)
direct write to tcp outputStream
|
io.netty.channel.ChannelProgressivePromise |
write(ByteBuffer httpBody)
direct write to tcp outputStream.
|
io.netty.channel.ChannelProgressivePromise |
write(io.netty.handler.stream.ChunkedInput httpBody)
use netty batch write
|
io.netty.channel.ChannelProgressivePromise |
write(File file)
use netty zero copy
|
io.netty.channel.ChannelProgressivePromise |
write(FileChannel fileChannel,
long position,
long count)
use netty zero copy
|
io.netty.channel.ChannelProgressivePromise |
write(File file,
long position,
long count)
use netty zero copy
|
void |
write(int b) |
print, print, print, print, print, print, print, println, println, println, println, println, println, println, printlnrecyclepublic ServletOutputStreamWrapper(io.netty.channel.ChannelFutureListener closeListener)
public void setSuspendFlag(boolean suspendFlag)
suspendFlag - True = pause, false= resumepublic boolean isSuspendFlag()
public io.netty.channel.ChannelProgressivePromise write(ByteBuffer httpBody) throws IOException
NettyOutputStreamwrite 在接口中 NettyOutputStreamhttpBody - jdk ByteBuffer httpBodyIOException - if closeMappedByteBuffer,
ByteBufferpublic io.netty.channel.ChannelProgressivePromise write(io.netty.buffer.ByteBuf httpBody)
throws IOException
NettyOutputStreamwrite 在接口中 NettyOutputStreamhttpBody - netty ByteBuf httpBodyIOException - if closeChunkedFile,
ChunkedNioStream,
ChunkedNioFile,
ChunkedStreampublic io.netty.channel.ChannelProgressivePromise write(io.netty.handler.stream.ChunkedInput httpBody)
throws IOException
NettyOutputStreamwrite 在接口中 NettyOutputStreamhttpBody - ChunkedInput httpBodyIOException - if closeChunkedFile,
ChunkedNioStream,
ChunkedNioFile,
ChunkedStreampublic io.netty.channel.ChannelProgressivePromise write(FileChannel fileChannel, long position, long count) throws IOException
NettyOutputStreamwrite 在接口中 NettyOutputStreamfileChannel - FileChannel httpBodyposition - positioncount - countChannelProgressivePromise.addListener(GenericFutureListener) }IOException - if closeGenericProgressiveFutureListenerpublic io.netty.channel.ChannelProgressivePromise write(File file, long position, long count) throws IOException
NettyOutputStreamwrite 在接口中 NettyOutputStreamfile - File httpBodyposition - positioncount - countChannelProgressivePromise.addListener(GenericFutureListener) }IOException - if closeGenericProgressiveFutureListenerpublic io.netty.channel.ChannelProgressivePromise write(File file) throws IOException
NettyOutputStreamwrite 在接口中 NettyOutputStreamfile - File httpBodyChannelProgressivePromise.addListener(GenericFutureListener) }IOException - if closeGenericProgressiveFutureListenerpublic boolean isReady()
isReady 在类中 javax.servlet.ServletOutputStreampublic void setWriteListener(javax.servlet.WriteListener listener)
setWriteListener 在类中 javax.servlet.ServletOutputStreampublic void write(int b)
throws IOException
write 在类中 OutputStreamIOExceptionpublic void close()
NettyOutputStreamclose 在接口中 NettyOutputStreamclose 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 OutputStreampublic void flush()
throws IOException
NettyOutputStreamflush 在接口中 NettyOutputStreamflush 在接口中 Flushableflush 在类中 OutputStreamIOException - if closepublic void resetBuffer()
public void write(byte[] b,
int off,
int len)
throws IOException
write 在类中 OutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write 在类中 OutputStreamIOExceptionpublic void wrap(ServletOutputStream source)
Wrapperwrap 在接口中 Wrapper<ServletOutputStream>source - source objectpublic ServletOutputStream unwrap()
Wrapperunwrap 在接口中 Wrapper<ServletOutputStream>public <T> void recycle(Consumer<T> consumer)
Recyclablerecycle 在接口中 RecyclableT - last recycle objectconsumer - callbackCopyright © 2021. All rights reserved.