java.lang.Object
cloud.piranha.nano.NanoResponseBuilder
public class NanoResponseBuilder
extends java.lang.Object
The builder so you can easily build instances of
NanoResponse.- Author:
- Manfred Riem (mriem@manorrock.com)
- See Also:
NanoResponse
-
Field Summary
Fields Modifier and Type Field Description private NanoResponseresponseStores the response. -
Constructor Summary
Constructors Constructor Description NanoResponseBuilder()Constructor. -
Method Summary
Modifier and Type Method Description NanoResponseBuilderbodyOnly(boolean bodyOnly)Set the body only flag.NanoResponsebuild()Build the response.NanoResponseBuilderoutputStream(java.io.OutputStream outputStream)Set the output stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
response
Stores the response.
-
-
Constructor Details
-
NanoResponseBuilder
public NanoResponseBuilder()Constructor.
-
-
Method Details
-
bodyOnly
Set the body only flag.- Parameters:
bodyOnly- if true the response will only output the body, if false the response will contain the status line and response headers.- Returns:
- the builder.
-
build
Build the response.- Returns:
- the response.
-
outputStream
Set the output stream.- Parameters:
outputStream- the output stream.- Returns:
- the builder.
-