A chunked response means that instead of waiting for the entire result, split the result into chunks (partial results) and send one after the other. Sending a response in chunks is useful for a RESTful web API if the resource returned by the API is huge in size.
With Jersey, you can use can use the
org.glassfish.jersey.server.ChunkedOutput class as the return type to send the response to a client in chunks. The chunked output content can be any data type for which a
MessageBodyWriter<T> (entity provider) is available.
When you specify
ChunkedOutput as the return type for a REST resource method, it tells the runtime that the response will be chunked and sent one by one to the client. Seeing