A chunked response means that instead of waiting for the entire result, the results are split into chunks (partial results) and sent 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 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 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 ChunkedOutput as the return type for a method, Jersey will switch to the asynchronous processing mode while processing this method at runtime,...