org.nnsoft.shs.core.http.serialize
Class ResponseSerializer
java.lang.Object
org.nnsoft.shs.core.http.serialize.ResponseSerializer
public final class ResponseSerializer
- extends Object
Serializes an HTTP Response
to the target output stream
This class is not thread safe, create a new instance for each serialization.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResponseSerializer
public ResponseSerializer(SelectionKey key)
ResponseSerializer
public ResponseSerializer(SelectionKey key,
boolean gzipEnabled)
- Creates a new serializer instance.
serialize
public void serialize(Response response)
throws IOException
- Streams the input
Response
instance to the target output stream.
- Parameters:
response
- the response has to be serialized
- Throws:
IOException
- if any error occurs while streaming
Copyright © 2012 99 Software Foundation. All Rights Reserved.