Package org.takes.rs
Class RsPrint
- java.lang.Object
-
- org.takes.rs.RsWrap
-
- org.takes.rs.RsPrint
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
asString()
String
print()
Print it into string.void
print(OutputStream output)
Print it into output stream.String
printBody()
Print body into string.void
printBody(OutputStream output)
Print it into output stream.String
printHead()
Print head into string.void
printHead(OutputStream output)
Print it into output stream.
-
-
-
Constructor Detail
-
RsPrint
public RsPrint(Response res)
Ctor.- Parameters:
res
- Original response
-
-
Method Detail
-
asString
public String asString() throws Exception
- Specified by:
asString
in interfaceorg.cactoos.Text
- Throws:
Exception
-
print
public String print() throws IOException
Print it into string.- Returns:
- Entire HTTP response
- Throws:
IOException
- If fails
-
printBody
public String printBody() throws IOException
Print body into string.- Returns:
- Entire body of HTTP response
- Throws:
IOException
- If fails
-
printHead
public String printHead() throws IOException
Print head into string.- Returns:
- Entire head of HTTP response
- Throws:
IOException
- If fails- Since:
- 0.10
-
print
public void print(OutputStream output) throws IOException
Print it into output stream.- Parameters:
output
- Output to print into- Throws:
IOException
- If fails
-
printHead
public void printHead(OutputStream output) throws IOException
Print it into output stream.- Parameters:
output
- Output to print into- Throws:
IOException
- If fails- Since:
- 0.10
-
printBody
public void printBody(OutputStream output) throws IOException
Print it into output stream.- Parameters:
output
- Output to print into- Throws:
IOException
- If fails
-
-