Package ej.hoka.http.encoding
Class IdentityTransferEncoding
- java.lang.Object
-
- ej.hoka.http.encoding.IdentityTransferEncoding
-
- All Implemented Interfaces:
TransferEncoding
public final class IdentityTransferEncoding extends Object implements TransferEncoding
Identity transfer coding handler.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()Returns an internal ID of this encoding handler.static IdentityTransferEncodinggetInstance()Returns an instance ofIdentityTransferEncoding.InputStreamopen(HttpRequest request, InputStream input)Creates a new instance ofIdentityMessageBodyInputStreamto read the message body of the HTTP request.OutputStreamopen(HttpResponse response, OutputStream output)Creates anIdentityMessageBodyOutputStreamto write the message body of the HTTP response.
-
-
-
Method Detail
-
getInstance
public static IdentityTransferEncoding getInstance()
Returns an instance ofIdentityTransferEncoding.- Returns:
- an instance of
IdentityTransferEncoding
-
getId
public String getId()
Returns an internal ID of this encoding handler.- Specified by:
getIdin interfaceTransferEncoding- Returns:
- null
-
open
public InputStream open(HttpRequest request, InputStream input) throws IOException
Creates a new instance ofIdentityMessageBodyInputStreamto read the message body of the HTTP request.- Specified by:
openin interfaceTransferEncoding- Parameters:
request- the HTTP request object.input- the input stream to read the message body of the HTTP request.- Returns:
IdentityMessageBodyOutputStream.- Throws:
IOException- if an I/O error occurs.- See Also:
IdentityMessageBodyInputStream
-
open
public OutputStream open(HttpResponse response, OutputStream output) throws IOException
Creates anIdentityMessageBodyOutputStreamto write the message body of the HTTP response.- Specified by:
openin interfaceTransferEncoding- Parameters:
response- theHttpResponseoutput- theOutputStreamto write the message body of the HTTP response- Returns:
IdentityMessageBodyOutputStream- Throws:
IOException- when I/O error occurs- See Also:
IdentityMessageBodyOutputStream
-
-