net.officefloor.plugin.socket.server.http.response
Interface HttpResponseWriter

All Known Implementing Classes:
HttpResponseWriterImpl

public interface HttpResponseWriter

Writes content to the HttpResponse.

Author:
Daniel Sagenschneider

Method Summary
 void write(String contentType, String contents)
           Writes content to the HttpResponse.
 void write(String contentEncoding, String contentType, Charset charset, ByteBuffer contents)
          Writes content to the HttpResponse.
 

Method Detail

write

void write(String contentEncoding,
           String contentType,
           Charset charset,
           ByteBuffer contents)
           throws IOException
Writes content to the HttpResponse.

Parameters:
contentEncoding - Content-Encoding of the contents to write. May be null if Content-Encoding is unknown.
contentType - Content-Type of the contents to write. May be null if Content-Type is unknown.
charset - Charset of the contents to write. May be null if the contents is not text or the Charset is unknown.
contents - Contents to write to the HttpResponse.
Throws:
IOException - If fails to write contents to HttpResponse.

write

void write(String contentType,
           String contents)
           throws IOException

Writes content to the HttpResponse.

As the content is String, there should be no Content-Encoding on the contents to write.

Parameters:
contentType - Content-Type of the contents to write. May be null if Content-Type is unknown.
contents - Contents to write to the HttpResponse.
Throws:
IOException - If fails to write contents to HttpResponse.


Copyright © 2005-2011. All Rights Reserved.