Package cloud.piranha.nano
Class NanoResponseBuilder
- java.lang.Object
-
- cloud.piranha.nano.NanoResponseBuilder
-
public class NanoResponseBuilder extends Object
The builder so you can easily build instances ofNanoResponse
.- Author:
- Manfred Riem ([email protected])
- See Also:
NanoResponse
-
-
Constructor Summary
Constructors Constructor Description NanoResponseBuilder()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NanoResponseBuilder
bodyOnly(boolean bodyOnly)
Set the body only flag.NanoResponse
build()
Build the response.NanoResponseBuilder
outputStream(OutputStream outputStream)
Set the output stream.
-
-
-
Method Detail
-
bodyOnly
public NanoResponseBuilder bodyOnly(boolean 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
public NanoResponse build()
Build the response.- Returns:
- the response.
-
outputStream
public NanoResponseBuilder outputStream(OutputStream outputStream)
Set the output stream.- Parameters:
outputStream
- the output stream.- Returns:
- the builder.
-
-