Package org.takes.rs

Class RsPrint

  • All Implemented Interfaces:
    org.cactoos.Bytes, org.cactoos.Text, Body, Head, Response

    public final class RsPrint
    extends RsWrap
    implements org.cactoos.Text, org.cactoos.Bytes
    Response decorator that can print an entire response in HTTP format.

    The class is immutable and thread-safe.

    Since:
    0.1
    • Constructor Detail

      • RsPrint

        public RsPrint​(Response res)
        Ctor.
        Parameters:
        res - Original response
    • Method Detail

      • asString

        public String asString()
                        throws Exception
        Specified by:
        asString in interface org.cactoos.Text
        Throws:
        Exception
      • asBytes

        public byte[] asBytes()
                       throws Exception
        Specified by:
        asBytes in interface org.cactoos.Bytes
        Throws:
        Exception