Class HttpFastStringResponse
java.lang.Object
net.targetr.wtm3.net.http.HttpResponse
net.targetr.wtm3.net.http.response.HttpFastStringResponse
Same as StringResponse but skips ETags and cache validation and disables gzip.
- Author:
- Dr Michael Gardiner
-
Field Summary
FieldsFields inherited from class net.targetr.wtm3.net.http.HttpResponse
code, headers, info, version, writeErrorHandler
-
Constructor Summary
ConstructorsConstructorDescriptionHttpFastStringResponse
(String text) Creates a plain text response suitable for sending to a client with content type of text/plain without adding ETag or gzip. -
Method Summary
Modifier and TypeMethodDescriptionvoid
write
(HttpRequest request, OutputStream out) Overridden write implementation to make it faster.Methods inherited from class net.targetr.wtm3.net.http.HttpResponse
getBodyInputStream, getContentLength, parseResponse, toString
-
Field Details
-
HEADER_CONTENT_LENGTH
- See Also:
-
HEADER_CONTENT_TYPE
- See Also:
-
-
Constructor Details
-
HttpFastStringResponse
Creates a plain text response suitable for sending to a client with content type of text/plain without adding ETag or gzip.- Parameters:
text
- The text to send to client.
-
-
Method Details
-
write
Overridden write implementation to make it faster.- Overrides:
write
in classHttpResponse
- Parameters:
request
- Request associated with response.out
- The OutputStream to write the response.- Throws:
Exception
- If an error occurs while writing the response.
-