T - chunk type.public class ChunkedOutput<T> extends javax.ws.rs.core.GenericType<T> implements Closeable
| Modifier | Constructor and Description | 
|---|---|
| protected  | ChunkedOutput()Create new  ChunkedOutput. | 
| protected  | ChunkedOutput(byte[] chunkDelimiter)Create new  ChunkedOutputwith a custom chunk delimiter. | 
| protected  | ChunkedOutput(byte[] chunkDelimiter,
             javax.inject.Provider<AsyncContext> asyncContextProvider)Create new  ChunkedOutputwith a custom chunk delimiter. | 
| protected  | ChunkedOutput(String chunkDelimiter)Create new  ChunkedOutputwith a custom chunk delimiter. | 
|   | ChunkedOutput(Type chunkType)Create  ChunkedOutputwith specified type. | 
|   | ChunkedOutput(Type chunkType,
             byte[] chunkDelimiter)Create new  ChunkedOutputwith a custom chunk delimiter. | 
|   | ChunkedOutput(Type chunkType,
             String chunkDelimiter)Create new  ChunkedOutputwith a custom chunk delimiter. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close()Close this response - it will be finalized and underlying connections will be closed
 or made available for another response. | 
| boolean | equals(Object obj) | 
| protected void | flushQueue() | 
| int | hashCode() | 
| boolean | isClosed()Get state information. | 
| protected void | onClose(Exception e)Executed only in case of close being triggered by client. | 
| String | toString() | 
| void | write(T chunk)Write a chunk. | 
protected ChunkedOutput()
ChunkedOutput.public ChunkedOutput(Type chunkType)
ChunkedOutput with specified type.chunkType - chunk type. Must not be {code null}.protected ChunkedOutput(byte[] chunkDelimiter)
ChunkedOutput with a custom chunk delimiter.chunkDelimiter - custom chunk delimiter bytes. Must not be {code null}.protected ChunkedOutput(byte[] chunkDelimiter,
                        javax.inject.Provider<AsyncContext> asyncContextProvider)
ChunkedOutput with a custom chunk delimiter.chunkDelimiter - custom chunk delimiter bytes. Must not be {code null}.public ChunkedOutput(Type chunkType, byte[] chunkDelimiter)
ChunkedOutput with a custom chunk delimiter.chunkType - chunk type. Must not be {code null}.chunkDelimiter - custom chunk delimiter bytes. Must not be {code null}.protected ChunkedOutput(String chunkDelimiter)
ChunkedOutput with a custom chunk delimiter.chunkDelimiter - custom chunk delimiter string. Must not be {code null}.public void write(T chunk) throws IOException
chunk - a chunk instance to be written.IOException - if this response is closed or when encountered any problem during serializing or writing a chunk.protected void flushQueue()
                   throws IOException
IOExceptionpublic void close()
           throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean isClosed()
ChunkedOutput can be closed by the client side - client can close connection
 from its side.protected void onClose(Exception e)
e - Exception causing the closepublic int hashCode()
hashCode in class javax.ws.rs.core.GenericType<T>Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.