public class ChunkedTransferCodingHandler extends java.lang.Object implements IHTTPTransferCodingHandler
HTTP-1.1 chunked transfer encoding handler to read and write data in chunked encoding.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getId()
Returns the internal ID of the
ChunkedTransferCodingHandler . |
static ChunkedTransferCodingHandler |
getInstance()
Factory method to create an instance of ChunkedTransferCodingHandler.
|
java.io.InputStream |
open(HTTPRequest request,
java.io.InputStream input)
Creates a
ChunkedMessageBodyInputStream to read the body of the HTTP request in "chunked" encoding from
the HTTPRequest and the InputStream . |
java.io.OutputStream |
open(HTTPResponse response,
java.io.OutputStream output)
Creates an
OutputStream to write the body of the HTTP response in "chunked" encoding using the
HTTPResponse and the OutputStream . |
public static ChunkedTransferCodingHandler getInstance()
Factory method to create an instance of ChunkedTransferCodingHandler.
ChunkedTransferCodingHandler
public java.lang.String getId()
Returns the internal ID of the ChunkedTransferCodingHandler
.
getId
in interface IHTTPTransferCodingHandler
public java.io.InputStream open(HTTPRequest request, java.io.InputStream input) throws java.io.IOException
Creates a ChunkedMessageBodyInputStream
to read the body of the HTTP request in "chunked" encoding from
the HTTPRequest
and the InputStream
.
open
in interface IHTTPTransferCodingHandler
request
- the HTTPRequest
input
- the InputStream
ChunkedMessageBodyInputStream
java.io.IOException
- when I/O error occurspublic java.io.OutputStream open(HTTPResponse response, java.io.OutputStream output) throws java.io.IOException
Creates an OutputStream
to write the body of the HTTP response in "chunked" encoding using the
HTTPResponse
and the OutputStream
.
open
in interface IHTTPTransferCodingHandler
response
- the HTTPResponse
output
- the OutputStream
ChunkedMessageBodyOutputStream
java.io.IOException
- if an I/O error occurs