org.springframework.mock.http

Class MockHttpInputMessage

  • java.lang.Object
    • org.springframework.mock.http.MockHttpInputMessage
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.io.InputStream getBody()
      Return the body of the message as an input stream.
      HttpHeaders getHeaders()
      Return the headers of this message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MockHttpInputMessage

        public MockHttpInputMessage(byte[] content)
      • MockHttpInputMessage

        public MockHttpInputMessage(java.io.InputStream body)
    • Method Detail

      • getHeaders

        public HttpHeaders getHeaders()
        Description copied from interface: HttpMessage
        Return the headers of this message.
        Specified by:
        getHeaders in interface HttpMessage
        Returns:
        a corresponding HttpHeaders object (never null)
      • getBody

        public java.io.InputStream getBody()
                                    throws java.io.IOException
        Description copied from interface: HttpInputMessage
        Return the body of the message as an input stream.
        Specified by:
        getBody in interface HttpInputMessage
        Returns:
        the input stream body (never null)
        Throws:
        java.io.IOException - in case of I/O errors