org.nnsoft.shs.core.http.serialize
Class ResponseSerializer

java.lang.Object
  extended by 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.


Constructor Summary
ResponseSerializer(SelectionKey key)
           
ResponseSerializer(SelectionKey key, boolean gzipEnabled)
          Creates a new serializer instance.
 
Method Summary
 void serialize(Response response)
          Streams the input Response instance to the target output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseSerializer

public ResponseSerializer(SelectionKey key)

ResponseSerializer

public ResponseSerializer(SelectionKey key,
                          boolean gzipEnabled)
Creates a new serializer instance.

Method Detail

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.